Firefox password-issue in personal configuration
Posted: Tue Mar 31, 2009 11:49 pm
There are a few reports of this issue in the forum: The Firefox-issue in the personal configuration. Firefox enters the password in there, and this results in an error-message by serendipity when trying to save.
I think that the error is caused by wrong behavior of serendipity rather than Firefox. What happens exactly: The old password is entered unchanged, the check-password-value is empty, so s9y shouldn't change the password - and it shouldn't display the error-message. This is almost the same exception as when no password is entered at all.
The current boolean-expression is:The first part-expression is the exception. We can extend this to: To be honest, I didn't test this expression, I'm not utterly sure the brackets are correct (but they should, according to the rules). I negated it (thanks De Morgan ) and worked with that easier to read one. In my (pretty basic) tests it worked fine, the Firefox-issue is no more. Maybe you want to have a look at it.
sincerely
I think that the error is caused by wrong behavior of serendipity rather than Firefox. What happens exactly: The old password is entered unchanged, the check-password-value is empty, so s9y shouldn't change the password - and it shouldn't display the error-message. This is almost the same exception as when no password is entered at all.
The current boolean-expression is:
Code: Select all
!empty($_POST['password']) && $_POST['check_password'] != $_SESSION['serendipityPassword'] && serendipity_passwordhash($_POST['check_password']) != $_SESSION['serendipityPassword']) {
Code: Select all
!empty($_POST['password']) => ( !empty($_POST['password'] && $_POST['password'] != $_SESSION['serendipityPassword'] && serendipity_passwordhash($_POST['password']) != $_SESSION['serendipityPassword'] )
sincerely