Opened 9 years ago

Last modified 9 years ago

#12278 closed defect

Reset password does not touch .htpasswd — at Version 8

Reported by: massimo.b@… Owned by: Steffen Hoffmann
Priority: high Component: AccountManagerPlugin
Severity: normal Keywords: password reset, forgot password
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

This is trac-1.0.4.

Using Reset password does send a new password via Email, but never touches the trac.htpasswd. The new password doesn't work, the old password is still valid and password-reset enforcement is there after login.

Changing the htpasswd file manually by the admin is the only work-around for users forgot their passwords:

htpasswd trac.htpasswd USER

I double-checked right now with the latest SVN version.

The logs have

INFO: Password reset for user: ...

and now error.

AccountManager config:

[account-manager]
htpasswd_file = /mnt/data/trac/projects/A/trac.htpasswd
htpasswd_hash_type = md5
login_attempt_max_count = 3
password_store = HtPasswdStore
persistent_sessions = true
reset_password = true
user_lock_time = 30

Change History (8)

comment:1 Changed 9 years ago by Steffen Hoffmann

Thanks for taking care to report your findings. But I would prefer, if you did not ignore invitations to answer questions first - on our trac-users t:MailingList.

And be sure to read about the password reset procedure first, before asserting an issues where there is likely just normal behavior. Sure user's auth store is not touched before next successful login, because this way we avoid unwanted or even maliciously triggered lockouts by writing the new temporary password to ResetPasswdStore, a new, hidden store, that in turn requires loading and configuration of a SessionStore's hash method. You shall see associated complaints on Trac environment re-load, if this is relevant for you.

comment:2 Changed 9 years ago by Ryan J Ollos

Possible duplicate of #11869?

comment:3 Changed 9 years ago by massimo.b@…

I read the password reset procedure but as the new password sent by mail just is not accepted this issue seemed to be a wrong behaviour.

Yes, looking like a duplicate of #11869. What is the status there? Discussion has just stopped.

If HtPasswdStore won't be able to use the Reset procedure by design then the cause is clear why my configuration is not working. Could we have a note about that in this section?

comment:4 Changed 9 years ago by Steffen Hoffmann

It is not strictly related to a particular password store. All share the common design limitation to store just one hash per UID.

In general the password reset (old style) was vulnerable to DOS attack by locking out users with known email through repeated password reset requests. So (new style) procedure now requires configuration of a hash method and enabling it together with ResetPasswdStore.

#11869 is about a sane and graceful fallback from new to old behavior for some situations, especially when not using account manager's LoginModule, so ResetPasswdStore wont work too.

comment:5 Changed 9 years ago by massimo.b@…

The fallback is only applied if not using AccountManager? All share the common design limitation? So is there any way to get password reset working with AccountManager without help of the administrator, as AccountManager provides the setting reset_password = true?

comment:6 in reply to:  5 ; Changed 9 years ago by Steffen Hoffmann

Replying to massimo.b@…:

The fallback is only applied if not using AccountManager?

I think you got my explanation wrong.

In Trac core (without account manager plugin) there is no user-accessible account management at all. The fallback I've been talking about refers to the former password reset procedure, that has been replaced. Now I aim at making it switch-able somehow.

All share the common design limitation?

Yes. I think you'll not find exceptions from the rule one UID - one password hash, even in third-party extensions providing more authentication backends for this plugin.

So is there any way to get password reset working with AccountManager without help of the administrator, as AccountManager provides the setting reset_password = true?

Yes, it should work for regular users, but I'm aware of issues regarding caching of relevant db parts in recent Trac 1.0.4.

comment:7 in reply to:  6 Changed 9 years ago by massimo.b@…

Replying to hasienda:

So is there any way to get password reset working with AccountManager without help of the administrator, as AccountManager provides the setting reset_password = true?

Yes, it should work for regular users, but I'm aware of issues regarding caching of relevant db parts in recent Trac 1.0.4.

So how can I get a basic password reset without administrator? It does not work for regular users as described in the initial comment. That's why I filed this as bug. Would you prefer to move discussion to the mailing list?

comment:8 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.