chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use email_valid() to check email addresses throughout
[disorder]
/
cgi
/
actions.c
diff --git
a/cgi/actions.c
b/cgi/actions.c
index a139eaf681f68af7fea8a883b694e6b7a22eb892..4d064e0fb8e86c8ae6a44e0360b0992eed8165e3 100644
(file)
--- a/
cgi/actions.c
+++ b/
cgi/actions.c
@@
-435,8
+435,7
@@
static void act_register(void) {
}
/* We could well do better address validation but for now we'll just do the
* minimum */
}
/* We could well do better address validation but for now we'll just do the
* minimum */
- /* TODO use email_valid() */
- if(!strchr(email, '@')) {
+ if(!email_valid(email)) {
login_error("bademail");
return;
}
login_error("bademail");
return;
}
@@
-525,8
+524,7
@@
static void act_edituser(void) {
}
} else
password = password2 = 0;
}
} else
password = password2 = 0;
- /* TODO use email_valid() */
- if(email && !strchr(email, '@')) {
+ if(email && !email_valid(email)) {
login_error("bademail");
return;
}
login_error("bademail");
return;
}