Project

General

Profile

Actions

Defect #42584

closed

NoMethodError when creating a user with an invalid email address and domain restrictions are enabled

Added by Go MAEDA 4 days ago. Updated 21 minutes ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Administration
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When "Allowed email domains" or "Disallowed email domains" are configured in Administration > Settings, attempting to create a new user with an invalid email address that does not contain an '@' causes a NoMethodError in EmailAddress.domain_in? during validation. As a result, the user sees an "Internal Server Error" page.

The attached patch fixes the issue.


Files

Actions #1

Updated by Go MAEDA 3 days ago

I have updated the patch.

The updated patch also skips domain validation to avoid displaying an error message with an empty domain name, such as "Email contains a domain not allowed ()".

Actions #2

Updated by Go MAEDA 2 days ago

  • Target version changed from Candidate for next minor release to 5.1.8

Setting the target version to 5.1.8.

Actions #3

Updated by Marius BĂLTEANU about 15 hours ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed
Actions #4

Updated by Go MAEDA 21 minutes ago

  • Status changed from Resolved to Closed

Committed the fix in r23666 and merged it into stable branches in r23681 and r23682.

Actions

Also available in: Atom PDF