X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2fadbbc60560fe8562d7b6e652f8788c1d084d5f..33e95f039e696d2cfe6b673166a064e48ed1e341:/cgi/actions.c diff --git a/cgi/actions.c b/cgi/actions.c index 449c5dc..4d064e0 100644 --- a/cgi/actions.c +++ b/cgi/actions.c @@ -435,7 +435,7 @@ static void act_register(void) { } /* We could well do better address validation but for now we'll just do the * minimum */ - if(!strchr(email, '@')) { + if(!email_valid(email)) { login_error("bademail"); return; } @@ -524,7 +524,7 @@ static void act_edituser(void) { } } else password = password2 = 0; - if(email && !strchr(email, '@')) { + if(email && !email_valid(email)) { login_error("bademail"); return; } @@ -743,7 +743,7 @@ void dcgi_expand(const char *name, int header) { 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");