Filter email on ASCII
This commit is contained in:
parent
0d91315d20
commit
26b00f4c54
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ async fn handler(Query(request): Query<GenerateRequest>) -> Result<Json<Generate
|
|||
if request.secret != *API_SECRET {
|
||||
return Err(StatusCode::UNAUTHORIZED);
|
||||
}
|
||||
if !request.email.contains('@') {
|
||||
if !request.email.is_ascii() || !request.email.contains('@') {
|
||||
return Err(StatusCode::UNAUTHORIZED);
|
||||
}
|
||||
println!("{}", request.email);
|
||||
|
|
Loading…
Add table
Reference in a new issue