This is a patch to a recent checkout from SVN.
Viewing with Firefox 3.5.7, on submission of the login form, a GET
request was generated for a non-existent document, resulting in a 404
error, between the authentication and submission of the form.
This was caused by setting document.location in submit_form(). The DOM
reference document.login.action was, I presume, intended to refer to the
action property of the document.login element (the form element), but
this form also contains an input element named action. Firefox 3.5.7
returns a reference to the element named action which stringifies to
[object HTMLButtonElement]. This results in the query "GET
HTTP/1.1" and a 404 error, followed by submission of the form.
With this change, document.properties is not set and submit_form()
explicitly returns true if there is no authentication error, so the form
In case setting document.location is required for some browsers,
commented out code remains which uses
document.login.getAttribute('action') instead of document.login.action,
which should avoid the ambiguity between the property action and the
contained element named action.
Log in to post a comment.