You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/04/24 21:21:24 UTC

[2/2] allura git commit: Bugfix Ticket No - #7826

Bugfix Ticket No - #7826


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d0c8e3dc
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d0c8e3dc
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d0c8e3dc

Branch: refs/heads/master
Commit: d0c8e3dc684a1c5d9fd7474d9dc11a0a77bb2d3f
Parents: db07600
Author: dastanforever <pr...@outlook.com>
Authored: Sat Apr 11 09:47:24 2015 +0530
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Apr 24 18:36:48 2015 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/auth.py | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d0c8e3dc/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 1aa2d08..9c946e3 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -182,6 +182,11 @@ class AuthController(BaseController):
         user_record = M.User.by_email_address(email)
         allow_non_primary_email_reset = asbool(config.get('auth.allow_non_primary_email_password_reset', True))
 
+
+        if not re.match(r"[^@]+@[^@]+\.[^@]+", email):
+            flash('Enter email in correct format!')
+            redirect('/auth/forgotten_password')
+
         if not allow_non_primary_email_reset:
             message = 'If the given email address is on record, a password reset email has been sent to the account\'s primary email address.'
             email_record = M.EmailAddress.get(email=provider.get_primary_email_address(user_record=user_record),