Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery wird per http statt https geladen #2

Closed
katgirl opened this issue May 10, 2012 · 6 comments
Closed

jQuery wird per http statt https geladen #2

katgirl opened this issue May 10, 2012 · 6 comments

Comments

@katgirl
Copy link

katgirl commented May 10, 2012

Bei https wird jQuery trotzdem per http geladen.
Was dazu führt das der Browser die Seite als kompromittiert ansieht.

Daher muss hier vorher geprüft werden ob die Verbindung per https oder per http zustande kommt.

Daher im Fall von jQuery in ./system/modules/usejquery/UseJQuery.php entsprechend verändert werden.
$strSrc = (($objLayout->jquerySource=='jquery_local') ? TL_PLUGINS_URL : $_SERVER['HTTPS'] = 'on' ? 'https://' : 'http://') . $GLOBALS['TL_JQUERY_VERSION'][$objLayout->jqueryVersion][$objLayout->jquerySource];

In der jquery_jquery muss dann natürlich vorher das http weg, während bei jquery_googleapis einfach https angenommen wird. Interessanter Ansatz ;-)

Ein schönerer Lösungsansatz wäre hier, wenn es eine $GLOBALS['LOCATIONPROTOCOL'] geben würde die dann entsprechend abgefragt werden kann. z.B. auch von eignen Extentions

$GLOBALS['LOCATIONPROTOCOL'] = 'http://' bzw. $GLOBALS['LOCATIONPROTOCOL'] = 'https://'

@JanoschSkuplik
Copy link
Owner

SSL wird beim Aufruf der jQuery-Dateien von code.jquery.com leider nicht unterstützt. Für die anderen Fälle werde ich es berücksichtigen.

Google empfiehlt den Aufruf der jQuery-Dateien über das google-CDN per SSL, daher dort default das https-Protokoll.

@katgirl
Copy link
Author

katgirl commented May 10, 2012

Es wäre ja nicht so wild gewesen, wenn es irgendwo eine Notiz hierfür gegeben hätte beim Einstellen, dann läuft man nicht in den Fehler. Lieber per SSL generell aus meiner Sicht als ein als kompromittiertest angezeigtes Zertifikat.

@JanoschSkuplik
Copy link
Owner

Muss es nun nur noch mal debuggen - dann kommts ins ER.

@Anguel
Copy link

Anguel commented Aug 10, 2012

@JanoschSkuplik
Copy link
Owner

Guter Hinweis - DANKE! Werde ich mal testen.

@Anguel
Copy link

Anguel commented Aug 10, 2012

Ich hatte das vor einiger Zeit gefunden und hatte das vorher auch noch nie gesehen, aber es scheint gut zu funktionieren. Hier ist noch eine Diskussion zum Thema:
http://stackoverflow.com/questions/4831741/can-i-change-all-my-http-links-to-just

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants