I'm trying to automate some stuff which involves browsing to a https url. I'm using py-appscript with Safari on Mac OS X. But when Safari navigates to the https URL, since I have a self-signed certificate, it throws up a popup window which asks you to accept it to continue. I could not figure out a way to do this. Sure using signed certificates will solve the problem but I was curious if it is even possible via appscript to accept or click on the popup dialog boxes on Safari?
Well, answering my own question. Hopefully it'll be useful to someone...
from appscript import *
app(u'Safari').activate()
title = app(u'Safari').do_JavaScript(u'document.title', in_=app.documents[1])
app(u'Safari').documents[1].URL.set(u'https://localhost/')
app(u'System Events').application_processes[u'Safari'].windows[title].sheets[1].groups[2].UI_elements[u'Continue'].click()
Related
Running WAMP and I'm trying to embed an iframe of an external website (mcmaster) in a dokuwiki and I'm getting a security alert that doesn't allow the site to be displayed. Security alert says the sites certificate isn't good, and I didn't get the option to allow the page in the iframe but if i opened in a new window i got the option to. So after allowing it just returns a blank screen. What do I need to enable or exception to add in Apache to allow the server to embed this website? Apologies if this is in the wrong stack but I assume this is a server issue not a coding issue, as other sites work fine with the syntax.
I have made an app that will login automatically in the websites I use daily.
1 of them uses a security certificate which I have installed, when I browse it with IE I can accept the certificate and login, same with chrome, but when I browse with my app it will only show me
Navigation to the webpage was canceled
What you can try:
Refresh the page.
I'm thinking I have to somehow include that certificate on my app but I'm stuck, I've been googling about it but I can't find a straight answer.
I've read that the webbrowser control doesn't support HTTPS which the website I need to login is, if so is there any other way I can access the website within my app, maybe a different webbrowser control?
I'm using VB.net by the way.
some extra info:
I don't own the website so I cannot make any changes there.
I do have valid and legal access to the website using the certificate they issued for me.
The problem was I had browser.ScriptErrorsSuppressed = True
Somehow the browser control was taking the "Accept certificate" messagebox as script error.
I am trying to integrate a Mailchimp sign up form with my website. I generated the form in Mailchimp and copied the embed code to my site. The problem is that my site has an SSL certificate and when my potential clients try to sign up to my mailing list it gives them a security warning (in firefox) saying:
"Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.
Are you sure you want to continue sending this information"
Is there any way to avoid getting this warning?
Thank you very much for any help.
I was also facing the same problem using default embed code provided by mailchimp, but that wasn't working on SSL site.
So after Googling for solution i found this link:
Stop MailChimp Forms Breaking Your SSL
https://www.ostraining.com/blog/coding/mailchimp-forms-ssl/
and it wasn't a big problem simply need to change the url from list-manage1.com to "list-manage.com"
simply need to test after removing 1 from the list-manage1.com and it worked fine after that.
It also works fine for post-json embed urls.
Short answer. No
Longer answer. No, you are stuck with that warning. You are posting to an unsecured site from a secured site and the user will get this notification.
It's more work than a simple embed, but you can do this using the MailChimp API which has support for SSL. See the section entitled HTTPS / Secure Connections in the API docs.
You can edit the form Mailchimp provide to embed so that it uses https and not http in the action url.
I'm hoping this is just a bug on Facebook's end that will be fixed soon, but in my Facebook Connect app I'm launching the dialogue FB provides to make a post. This dialogue is launched on a page with an SSL connection. In this dialogue the profile pic for some users comes up with a security warning while others display correctly. I'm already setup to use Facebook's SSL javascript file instead of the HTTP file.
This is a bug at Facebook, but there's a work-around. When you use Facebook Connect to show a profile pic, you must set facebook-logo="false" on the fb:profile-pic FBML tag. (Note: the default is "true"). If you do this, and follow the instructions at facebook for using ssl, then the profile pic will be served using the correct protocol. If you leave it set to "true", then you always get the profile pics over http.
The bug is reported at http://bugs.developers.facebook.com/ as issue 5507 and possibly 7072 and 8485.
Also check whether you are serving the xd_receiver under ssl. The debugging hint at the bottom of this page can help you find if there are requests going to facebook other than the pictures which might not be SSL, thus confusing their determination of whether the page is under ssl: http://wiki.developers.facebook.com/index.php/Facebook_Connect_Via_SSL
I would use fiddler and see if there are other requests going to facebook which are not ssl, that will probably give you an indication of what is being missed, or if it is a bug.
My implementation of Facebook Connect (just a simple login button, fb:login-button) works perfectly on Firefox and IE.
But the same button is not showing up in Safari/Chrome (Webkit).
Here's what's ironic. In my debugging effort, I saved the page (that contains fb:login-button) up as a static page and then load it in Safari. And the button shows up, everything works!
The exact same page (with the exact same HTML source) rendered by my PHP has no way for bringing up the button.
I'm trying hard to support Webkit here but I'm close to giving up. Can anybody help?
I found one more way this can occur (the blame-myself-for-being-stupid way); it's probably not common, but in the event is saves anyone else the hassle, here it is:
This symptom can also be caused by various security tools blocking facebook resources.
In my case, I'd installed Facebook Disconnect ages ago in Chrome as a plugin and forgotten all about it being installed. I also had a second installation of Chrome that was seemingly identical (but did not have Facebook Disconnect). The first would properly load the fb:login-button, and the other would not; took me ages before I looked at the plugins, because Facebook Disconnect didn't have an icon and so its presence was pretty easy for me to miss.
Here's what you'll see if some sort of security plugin is preventing facebook resources from loading. Just look at the html that renders in the browser using developer tools.
In a normal chrome session you'll end up with something like this:
<fb:login-button><a class="fb_button fb_button_medium"><span class="fb_button_text">Your text here</span></a></fb:login-button>
But in the version with facebook's resources disabled you'll end up with this:
<fb:login-button>Your text here</fb:login-button>
Like I said, pretty obvious in retrospect.
Had the same problem but it was not related to anything like a plugin or malformed content. It seems if you enable country filtering on your facebook page it has an issue with the like button, this should be fairly obvious. Facebook gets your location from your profile and not your IP address.
Make sure to disable country locking if you plan on using the social plugins.
This can be due to having ClickToFlash installed. Either disable it, or check "Automatically load invisible Flash views" in the ClickToFlash settings.
What we found out is that Safari (and maybe some older versions of Chrome or other WebKIT browsers) have a problem with Facebook's code using the innerHTML JS function if your page arrives with an XHTML response header (application/xhtml+xml).
Using text/html solves the issue.
In case of JSF2, which we use, the implementing the fix was as simple as wrapping the FB button like this:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://www.facebook.com/2008/fbml"
xmlns:f="http://java.sun.com/jsf/core">
...
<f:view contentType="text/html">
<fb:login-button>Login using Facebook</fb:login-button>
</f:view>
Facebook bug report here:
http://bugs.developers.facebook.net/show_bug.cgi?id=5545
I had this problem with the Facebook button not showing at all and it took me forever to figure out what it was. Luckily after days of hair pulling I will now share the answer with everyone. In my situation I simply didn't have xfbml enabled. In my FB.init I had it set to false:
FB.init({
appId : 'app_id', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : false, // parse XFBML
oauth : true // enable OAuth 2.0
});
I changed this to "true" (xfbml) and the login buttons works great now! :P Good luck!
This happened when I had the wrong domain in callback_url in config/facebooker.yml. Apparently it uses that to load the js files.
I had the same problem but I resolved it by making sure the URL in my app settings was exactly the same as the one for my site (i.e. it didn't work when I accessed my site without the www.).
I have tried every suggested solution here and it didn't work for me. But now I finally found the solution.
Facebook requires now a secured (https) for Canvas (Secure Canvas URL). The unsecured one will be deprecated soon.
Here is the main difference, Chrome doesn't like https connections with invalid certifications. On a localhost, it is very likely you have stunnel installed to allow https connection for the localhost. Firefox is ok with the self created SSL certificate and allows you to add an exception when trying to access that site. Chrome doesn't allow it out of the box.
When I load my app in Chrome the page is blank and I dont see any login button.
Click F12 and click the Netwrok tab in Chrome:
You see that the post request to your localhost is cancelled. DOUBLE Click on it.
Now you would see that chrome is blocking the localhost because of the certificate:
click on proceed anyway.
Now to back to your other tab and reload the page:
Chrome works now like Firefox and shows the login button.