fix check int in form response
This commit is contained in:
parent
76e9c4376a
commit
12e0bd7bac
1 changed files with 2 additions and 2 deletions
|
@ -66,12 +66,12 @@ public class MailConfirmation extends FormResponse {
|
||||||
|
|
||||||
@Route(path = "^\\/confirmation$", type = POST)
|
@Route(path = "^\\/confirmation$", type = POST)
|
||||||
public void exec(Matcher matcher, Context context, HttpReader reader, HttpWriter writer) throws Exception {
|
public void exec(Matcher matcher, Context context, HttpReader reader, HttpWriter writer) throws Exception {
|
||||||
if (context.isLogged()){
|
if(context.isLogged()){
|
||||||
context.response(403);
|
context.response(403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JSONObject json = json(reader);
|
JSONObject json = json(reader);
|
||||||
if(!areValids("email","code","pseudo","firstname","lastname","passwd")){
|
if((!areValids("email","pseudo","firstname","lastname","passwd")) || (!hasFields("code"))){
|
||||||
context.response(400);
|
context.response(400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue