fix check int in form response

This commit is contained in:
jeffcheasey88 2023-09-09 20:11:46 +02:00
parent 76e9c4376a
commit 12e0bd7bac

View file

@ -66,12 +66,12 @@ public class MailConfirmation extends FormResponse {
@Route(path = "^\\/confirmation$", type = POST)
public void exec(Matcher matcher, Context context, HttpReader reader, HttpWriter writer) throws Exception {
if (context.isLogged()){
if(context.isLogged()){
context.response(403);
return;
}
JSONObject json = json(reader);
if(!areValids("email","code","pseudo","firstname","lastname","passwd")){
if((!areValids("email","pseudo","firstname","lastname","passwd")) || (!hasFields("code"))){
context.response(400);
return;
}