The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Development Firefox password-issue in personal configuration

Discussion corner for Developers of Serendipity.
User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » 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:
Code: Select all
!empty($_POST['password']) && $_POST['check_password'] != $_SESSION['serendipityPassword'] && serendipity_passwordhash($_POST['check_password']) != $_SESSION['serendipityPassword']) {
The first part-expression is the exception. We can extend this to:
Code: Select all
!empty($_POST['password']) => ( !empty($_POST['password'] && $_POST['password'] != $_SESSION['serendipityPassword'] && serendipity_passwordhash($_POST['password']) != $_SESSION['serendipityPassword'] )
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
Attachments
personal.inc.txt
(5.72 KiB) Downloaded 72 times

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Wed Apr 01, 2009 1:37 pm

Hi!

We use autocomplete=off for the password field, so there shouldn't be an error?

I currently have no time to wrap my head around the logic, since it's potentially very dangerous to change and people currently should have no issues with it (due to autocomplete=off) I'm reluctant to change anytthing there right now...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Wed Apr 01, 2009 2:32 pm

Hi Garvin
In 1.4.1 und 1.5 (alpha2) the firefox-issue is still present for me, but I'll check that. Really think you should have a look at it when you have the time - the logic in the simple-version is easier, that alone is an improvement to the negated current one.
sincerely

PS: Thought that autocomplete maybe is missing at my both installations because I'm using a custom admin-template. But it's also missing with the standard one. Besides that is autocomplete not a real standard, is it?

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Thu May 21, 2009 11:09 am

*grml*
Last edited by onli on Mon Oct 26, 2009 9:42 pm, edited 1 time in total.

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Mon Oct 26, 2009 9:51 pm

push: In 1.5, there is still no "autocomplete=off" in this dialog and the issue is still present.
sincerely

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Mon Oct 26, 2009 10:01 pm

Hi!

autocomplete is container in the include/functions_installer.inc.php file for 'password' type input fields...?!?

Wher eexactly do you not see it?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Mon Oct 26, 2009 10:18 pm

When I go in my local blog (serendipity 1.5 alpha 2, shall I test a newer one?), there to "Eigene Einstellungen" (personal configuration), a password is automatically entered into the password-field and I can't find any autocomplete-command in the html. Template is bulletproof.

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Tue Oct 27, 2009 11:05 am

Hi!

Ah, damn! I confused this with the database user password. I now also committed it for the usual user password.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
onli
Regular
 
Posts: 1044
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Tue Oct 27, 2009 2:02 pm

Great :)



Return to Development

Who is online

Users browsing this forum: No registered users and 0 guests