commit/galaxy-central: jgoecks: Fix bug introduced in 1291bc31fec6.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/0901e892dd6a/ changeset: 0901e892dd6a user: jgoecks date: 2011-08-09 22:16:03 summary: Fix bug introduced in 1291bc31fec6. affected #: 2 files (54 bytes) --- a/lib/galaxy/security/validate_user_input.py Tue Aug 09 16:05:31 2011 -0400 +++ b/lib/galaxy/security/validate_user_input.py Tue Aug 09 16:16:03 2011 -0400 @@ -2,7 +2,7 @@ VALID_USERNAME_RE = re.compile( "^[a-z0-9\-]+$" ) -def validate_email( trans, email, user=None ): +def validate_email( trans, email, user=None, check_dup=True ): message = '' if user and user.email == email: return message @@ -10,7 +10,7 @@ message = "Enter a real email address" elif len( email ) > 255: message = "Email address exceeds maximum allowable length" - elif trans.sa_session.query( trans.app.model.User ).filter_by( email=email ).first(): + elif check_dup and trans.sa_session.query( trans.app.model.User ).filter_by( email=email ).first(): message = "User with that email already exists" return message --- a/lib/galaxy/web/controllers/requests_common.py Tue Aug 09 16:05:31 2011 -0400 +++ b/lib/galaxy/web/controllers/requests_common.py Tue Aug 09 16:16:03 2011 -0400 @@ -644,7 +644,7 @@ # Make sure email addresses are valid err_msg = '' for email_address in email_addresses: - err_msg += validate_email( email_address ) + err_msg += validate_email( trans, email_address, check_dup=False ) if err_msg: status = 'error' message += err_msg Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket