Fix the password reset URL.

Review Request #5961 — Created June 9, 2014 and submitted

Information

Review Board
release-2.0.x
967fe7f...

Reviewers

The regex for extracting the token from the password reset URL was incorrect,
which resulted in an error that claimed "The password reset link was invalid,
either because it expired or has already been used."

Went all the way through the password reset flow successfully.

Description From Last Updated

Col: 80 E501 line too long (95 > 79 characters)

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/accounts/urls.py
      Ignored Files:
    
    
  2. reviewboard/accounts/urls.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (95 > 79 characters)
    
  3. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/accounts/urls.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/accounts/urls.py (Diff revision 1)
     
     

    Looks like the - to / was the main fix. Should we continue doing .+ just to safe-guard against any future changes in these IDs?

    1. Actually the / shouldn't matter too much (since it extracts the parameters before calling the view, and we use reverse() to generate the URL). Since this is the regex that's used inside the django code, I'm not too worried about future changes. Perhaps that's naive, since the uidb64 backwards-incompatible change started all of this.

    2. Let me extract my foot from my mouth and try again.

      Yes, the / matters, but it could just as well be something else that's not glommed by the uidb64 parameter. That said, since this is the regex used in django.contrib.auth, I'd rather keep it as-is.

    3. I'm confused then. How did this break? The .+ should have captured all of that.

    4. Oh, glommed by the uidb64 parameter. Got it.

  3. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (ebb4cd6)