Opened 17 years ago
Closed 16 years ago
#2039 closed defect (bug) (fixed)
Wordpress fails silently when cookies are disabled
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | major | Version: | 2.0 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
If a user has disabled cookies then on logging in the user is
returned to the login page without any error message being displayed.
Wordpress should preferably be able to work with cookies disabled,
but at the very least should display an understandable error message
when the user has done this.
Steps to reproduce:
- Disable accepting cookies in web browser
- Go to http://<wordpress>/wp-login.php
- Enter valid login username and password
- Click "Login >>"
- User is returned to wp-login.php without error message
- Version tested: wordpress-2.0-RC1
- PHP version: 4.1.2-7.woody5
- Operating system: Debian GNU/Linux 3.0
Attachments (4)
Change History (26)
#1
@
17 years ago
- Component changed from Administration to General
- Severity changed from normal to major
#4
@
17 years ago
I figured a message informing the user that their cookies are disabled onLoad would work. What do you think?
#5
@
17 years ago
Good idea, but the patch needs some serious work in terms of grammer and XHTML validity.
#6
@
17 years ago
I am not sure if Javascript is the right way to go, since there is a good chance that people paranoid enough to turn off cookies will have turned off Javascript too.
The scheme I have used in the past was suggested in CGI Programming with Perl, and it doesn't rely on Javascript.
The login page checks for a cookie. If it is present, great, otherwise it sets a cookie then redirects to a cookie test page. If the cookie is set, it redirects back to the login page, otherwise it displays an error message. The book recommends that the redirection URL be an absolute path to avoid the webserver ignoring it.
#7
@
17 years ago
- Keywords dev-feedback added
Do we actually need to determine this programmatically or would a fixed footnote on the login page stating "requires cookies" be sufficient?
#8
@
17 years ago
@Nazgul
For usability reasons, yes I think this should be caught programatically. Otherwise there is an extra message to read for the users who have cookies enabled. For those who do not, a static footnote could be easily missed, whereas a big error message would be clear.
#17
@
16 years ago
login-test-cookie-r5735.patch takes a simpler server-side approach. Instead of a redirect, a test cookie is sent when the login form is displayed, and checked when the POST is processed.
#19
@
16 years ago
I like the server-side approach more, but do we need to use as test content the password cookie? Isn't just a "test"
enough?
#20
@
16 years ago
- Owner changed from rob1n to westi
- Status changed from assigned to new
I have updated the patch to address the concerns.
Test cookie is no-loger the password hash
I have also changed the error message to be more informative.
JavaScript to notify user onLoad