[ckan-discuss] bug: 'forgot pwd' link gives 404

Sean Hammond sean.hammond at okfn.org
Fri Apr 13 14:19:34 BST 2012


(I've followed up with Egon privately about resetting his password.)

ckan-devs, ckan restricts user names to contain only certain characters:

https://github.com/okfn/ckan/blob/master/ckan/logic/validators.py#L178

But there are some pre-existing users (on thedatahub for example) that
already have user names that don't meet this restriction (e.g. users
with OpenID accounts whose user name is a URL.) For those users, if they
try to edit their profile for example they will always get a message
that their username is invalid even if they aren't trying to change
their username. I'm guessing that this same issue is causing the
password reset form to fail for Egon.

I've written a code fix that just skips the usual user name validation
if the user account is pre-existing and the user name hasn't changed:

https://github.com/okfn/ckan/compare/name-validator-exception-for-preexisting-usernames

Do we want to merge this into master or not?

On Fri, Apr 13, 2012 at 11:30:09AM +0200, Sean Hammond wrote:
> On Fri, Apr 13, 2012 at 10:49:22AM +0200, Egon Willighagen wrote:
> > On Fri, Apr 13, 2012 at 10:41 AM, Toby Dacre <toby.okfn at gmail.com> wrote:
> > > http://thedatahub.org/en/user/reset
> > 
> > After entering the new password twice, I get to the same page, but
> > with this warning:
> > 
> > "{'name': [u'Url must be purely lowercase alphanumeric (ascii)
> > characters and these symbols: -_']}"
> > 
> > in a red box...
> > 
> > Also, the reset does not seem to have worked...
> > 
> > BTW, my account is:
> > http://thedatahub.org/en/user/1261b031-57f8-4214-a468-731c30b01b82
> > 
> > It's associated with an OpenID, but logging in with the OpenID did not
> > work (that's what I tried first...)
> 
> Password reset works fine with my normal username, so this is probably a
> bug that affects only OpenID usernames (or usernames with special
> characters in them). I'll look into this..



More information about the ckan-discuss mailing list