Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We should use protocol relative urls to load external resources to avoid browser messages about unsafe objects on the page if someone accesses the site using https.
The attached patch removes the http: from all resources where I thought it's applicable.
I've tested this only with the google js - not with the other adjustments.
The patch also contains removed trailing white-spaces but I think it's a manageable amount ;)
Comments
Comment #2
das-peter CreditAttribution: das-peter commentedI totally failed creating the patch :| Next try :D
Comment #3
zzolo CreditAttribution: zzolo commentedHey @das-peter. Thanks for the patch! I think this is a great change. I have committed the change.
http://drupalcode.org/project/openlayers.git/commit/f0ab3a6
Comment #5
coredumperror CreditAttribution: coredumperror commentedThis change completely broke openstreetmap- and mqcdn-based tiles on sites which use https for logged in users.
*.mqcdn.com
and*.openstreetmap.org
don't offer their tiles throughhttps://
at all, making it totally impossible for users logged into an SSL drupal site to input map data, since they can't see the tiles.I'm not entirely certain that this is actually necessary for google, either, but at least it doesn't (appear to) break anything.
I've attached a patch that puts the
http://
back onto all URLs for openstreetmap and mqcdn, as well as the one link to labs.metacarta.com, since it also doesn't serve that file through https.Comment #6
coredumperror CreditAttribution: coredumperror commentedWhoops, I set the wrong status.
Comment #7
PolHello,
Could you reroll your patch against the latest dev version please ?
Thanks !
Comment #8
PolI did it and committed.
Comment #9
coredumperror CreditAttribution: coredumperror commentedSorry for the lack of response, Pol. I was on vacation at the time. Thank you for rerolling and committing my patch.
Comment #11
timwoodIt looks like the fix for openstreetmap.org in #5 above was lost and never actually committed or something. I cannot find the change from the patch in any release or commit since Pol posted comment #8 above on 12/30/2012. The patch from das-peter committed by zzolo above in comments #2 and #3 above was the last time the osm base url line of code was changed, in that case it was changed to be protocol agnostic, which does not work as osm does not serve up tiles via HTTPS.
Attached patch reverts the OSM base url line back to using http://.
Also, I've flagged http://drupal.org/node/1947770 as a duplicate of this.
Comment #12
timwoodSorry, should have been needs review.
Comment #13
PolThanks TimWood,
Committed on 7.x-2.x and 7.x-3.x.