}
/* 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;
}
}
} else
password = password2 = 0;
- /* TODO use email_valid() */
- if(email && !strchr(email, '@')) {
+ if(email && !email_valid(email)) {
login_error("bademail");
return;
}
if(!(found = mx_find(p, 0/*report*/)))
fatal(errno, "cannot find %s", p);
if(header) {
- if(printf("Content-Type: text/html\n"
+ if(printf("Content-Type: text/html; charset=UTF-8\n"
"%s\n"
"\n", dcgi_cookie_header()) < 0)
fatal(errno, "error writing to stdout");