Richard Jones avatar Richard Jones committed 398959a

fixes

Comments (0)

Files changed (2)

templates/password_reset_change.pt

     </p>
 
     <form tal:attributes="action app/url_path" method="POST">
-      <input type="hidden" name=":action" value="password_reset_change" />
-      <input type="hidden" name="otk" value="data/otk" />
+      <input type="hidden" name=":action" value="pw_reset_change" />
+      <input type="hidden" name="otk" tal:attributes="value data/otk" />
       <table class="form">
     <tr>
       <th>Password:</th>
-      <td><input type="password" name="password" /><br/>
-      Minimum 8 characters.
+      <td><input type="password" name="password" />
       </td>
     </tr>
     <tr>
     </tr>
       </table>
     </form>
+  <p>Please ensure your password is of a reasonable length (>8 characters) and
+    mixes letters, cases and numbers.</p>
   </metal:fill>
 </html>
 
         # generate a reset OTK and mail the link
         info = dict(name=user['name'], url=self.config.url,
-            otk=self._gen_reset_otk(user))
+            email=user['email'], otk=self._gen_reset_otk(user))
         info['admin'] = self.config.adminemail
-        self.send_email(user['email'], password_change_message % info)
+        self.send_email(info['email'], password_change_message % info)
         self.write_template('message.pt', title="Request password reset",
             message='Email sent to confirm password change')
 
         msg = self._verify_new_password(pw, confirm, user)
         if msg:
             return self.write_template('password_reset_change.pt',
-                title="Password reset", retry=msg)
+                title="Password reset", otk=otk, retry=msg)
 
         self.store.store_user(user['name'], pw, user['email'], None)
-        self.store.delete_reset_otk(otk)
         self.write_template('message.pt', title="Password reset",
             message='Password has been reset')
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.