[TYPO3-core] RFC #11895: Cookie detection in new t3skin login screen fails for certain cirumstances
Steffen Gebert
steffen at steffen-gebert.de
Wed Sep 9 01:25:03 CEST 2009
This is an SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=11895
Branches:
Trunk
Problem:
With changeset 5899 (0011370) a new t3skin login screen has been committed
to trunk.
Coming with this changeset is a cookie detection [1] implemented in
JavaScript. If this detection thinks that cookie usage is not possible
(cookies not allowed), an image is shown ("ACTIVATE COOKIES, PLEASE")
instead of the login form.
However, this detection fails for following condition (at least in FF3.5):
- cookies are generally disallowed and
- certains domains are in a whitelist
If this condition is met (TYPO3 installation domain in whitelist),
detection fails , the form is covered by an annoying image and login is no
longer possible although cookies are accepted for this specific domain.
Solution:
Don't check navigator.cookieEnabled, but directly set testcookie.
Furthermore add an ignore-link (if there might still be cases, where check
fails)
Notes:
Thanks to Marcus Krause for reporting.
You can deactivate cookies in firefox by setting
network.cookie.cookieBehavior = 2
in about:config
[1]
var cookieEnabled = (navigator.cookieEnabled) ? true : false;
if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
document.cookie = "testcookie";
cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true :
false;
}
if (cookieEnabled) {
document.getElementById("t3-login-form-fields").style.display =
'block';
}
else {
document.getElementById("t3-nocookies-error").style.display = 'block';
}
More information about the TYPO3-team-core
mailing list