Ticket #1221 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Password reset tidy up

Reported by: dread Owned by: dread
Priority: minor Milestone: ckan-sprint-2011-10-28
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

  • No tests.
  • 500 error given when user is not found.

Change History

comment:1 Changed 3 years ago by dread

Exception details:

Module ckan.controllers.user:194 in request_reset
<<                  h.flash_error(_('No such user: %s') % id)
                   try:
                       mailer.send_reset_link(user)
                       h.flash_success(_('Please check your inbox for a reset code.'))
                       redirect('/')
>>  mailer.send_reset_link(user)
Module ckan.lib.mailer:69 in send_reset_link
<<  def send_reset_link(user):
           user.reset_key = make_key()
           model.Session.add(user)
           model.Session.commit()
>>  user.reset_key = make_key()
AttributeError: 'NoneType' object has no attribute 'reset_key'

comment:2 Changed 3 years ago by dread

  • Status changed from new to closed
  • Resolution set to fixed

Other edge cases and error conditions do not work properly either.

Fixed in cset:4737c86d1d81 for release 1.4.2.

Note: See TracTickets for help on using tickets.