Opened 13 years ago
Closed 10 years ago
#17890 closed defect (bug) (fixed)
"Add New Site" screen reports invalid email addresses as missing
Reported by: | kawauso | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.1 | Priority: | low |
Severity: | normal | Version: | 3.1.3 |
Component: | Networks and Sites | Keywords: | has-patch commit 3.9-early |
Focuses: | multisite, administration | Cc: |
Description
The new site user's email is passed through sanitize_email()
and the screen dies with 'Missing email address.' if it's empty()
.
sanitize_email()
returns an empty string (subject to filtering) on invalid email addresses however, so the following is_email()
check for invalid email addresses is never even reached.
Steps to reproduce:
- Add a new site with an email address such as foo@bar
Attachments (3)
Change History (11)
#1
@
13 years ago
- Keywords has-patch added
Patch moves sanitize_email()
call after if checking email is empty. Also removes is_email()
call since it performs much the same checks.
#2
@
11 years ago
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to low
Confirmed behavior. This is a pretty strange error message to toss up when an invalid email is entered.
17890.2.diff continues to use is_email()
, as there is just enough difference in functionality and we should continue to respect the filters that may be extending that. The sanitize_email()
use is moved down a bit after we check for a completely missing email address.
#4
@
11 years ago
- Component changed from Network Admin to Networks and Sites
- Focuses administration added
#6
@
10 years ago
17890.3.diff updates the previous patch to use isset()
and a string comparison rather than empty.
Now:
foo@bar
= invalid email address= missing email address
0
= invalid email addressfoo@bar.org
= ok
No is_email(), move sanitize_email() later