prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  mail_password form crashes if user is not found
  Visiting /mali_password without providing a userid will simply crash. And if mail_password_form is submitted and a user is not found, or the user doesn't have an email configured, it will crash as well.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `Products/CMFPlone/browser/login/mail_password.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 from AccessControl import Unauthorized
  3 from Products.CMFPlone import PloneMessageFactory as _
  4 from Products.Five import BrowserView
  5 from Products.statusmessages.interfaces import IStatusMessage
  6 
  7 
  8 class MailPasswordView(BrowserView):
  9 
  10     def __call__(self):
  11         try:
  12             response = self.context.portal_registration.mailPassword(
  13                 self.request.form.get('userid', ''),
  14                 self.request,
  15             )
  16         except ValueError as e:
  17             try:
  18                 msg = _(str(e))
  19             except Unauthorized:
  20                 # If we are not allowed to tell the user, what is wrong, he
  21                 # should get an error message and contact the admins
  22                 raise e
  23             IStatusMessage(self.request).add(msg)
  24             self.request.response.redirect(
  25                 self.context.absolute_url() + 'mail_password_form'
  26             )
  27         return response
  28
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/Products/CMFPlone/browser/login/mail_password.py b/Products/CMFPlone/browser/login/mail_password.py
  --- a/Products/CMFPlone/browser/login/mail_password.py
  +++ b/Products/CMFPlone/browser/login/mail_password.py
  @@ -8,6 +8,7 @@
   class MailPasswordView(BrowserView):
   
       def __call__(self):
  +        response = None
           try:
               response = self.context.portal_registration.mailPassword(
                   self.request.form.get('userid', ''),
  @@ -22,6 +23,6 @@
                   raise e
               IStatusMessage(self.request).add(msg)
               self.request.response.redirect(
  -                self.context.absolute_url() + 'mail_password_form'
  +                self.context.absolute_url() + '/mail_password_form'
               )
           return response
  
verification_info: {"golden_diff": "diff --git a/Products/CMFPlone/browser/login/mail_password.py b/Products/CMFPlone/browser/login/mail_password.py\n--- a/Products/CMFPlone/browser/login/mail_password.py\n+++ b/Products/CMFPlone/browser/login/mail_password.py\n@@ -8,6 +8,7 @@\n class MailPasswordView(BrowserView):\n \n     def __call__(self):\n+        response = None\n         try:\n             response = self.context.portal_registration.mailPassword(\n                 self.request.form.get('userid', ''),\n@@ -22,6 +23,6 @@\n                 raise e\n             IStatusMessage(self.request).add(msg)\n             self.request.response.redirect(\n-                self.context.absolute_url() + 'mail_password_form'\n+                self.context.absolute_url() + '/mail_password_form'\n             )\n         return response\n", "issue": "mail_password form crashes if user is not found\nVisiting /mali_password without providing a userid will simply crash. And if mail_password_form is submitted and a user is not found, or the user doesn't have an email configured, it will crash as well.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom AccessControl import Unauthorized\nfrom Products.CMFPlone import PloneMessageFactory as _\nfrom Products.Five import BrowserView\nfrom Products.statusmessages.interfaces import IStatusMessage\n\n\nclass MailPasswordView(BrowserView):\n\n    def __call__(self):\n        try:\n            response = self.context.portal_registration.mailPassword(\n                self.request.form.get('userid', ''),\n                self.request,\n            )\n        except ValueError as e:\n            try:\n                msg = _(str(e))\n            except Unauthorized:\n                # If we are not allowed to tell the user, what is wrong, he\n                # should get an error message and contact the admins\n                raise e\n            IStatusMessage(self.request).add(msg)\n            self.request.response.redirect(\n                self.context.absolute_url() + 'mail_password_form'\n            )\n        return response\n", "path": "Products/CMFPlone/browser/login/mail_password.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom AccessControl import Unauthorized\nfrom Products.CMFPlone import PloneMessageFactory as _\nfrom Products.Five import BrowserView\nfrom Products.statusmessages.interfaces import IStatusMessage\n\n\nclass MailPasswordView(BrowserView):\n\n    def __call__(self):\n        response = None\n        try:\n            response = self.context.portal_registration.mailPassword(\n                self.request.form.get('userid', ''),\n                self.request,\n            )\n        except ValueError as e:\n            try:\n                msg = _(str(e))\n            except Unauthorized:\n                # If we are not allowed to tell the user, what is wrong, he\n                # should get an error message and contact the admins\n                raise e\n            IStatusMessage(self.request).add(msg)\n            self.request.response.redirect(\n                self.context.absolute_url() + '/mail_password_form'\n            )\n        return response\n", "path": "Products/CMFPlone/browser/login/mail_password.py"}]}