Commit 6e187442 authored by PhiBo's avatar PhiBo 🚀

Check if required parameter was given

parent 6f8d8be9
......@@ -67,8 +67,8 @@ void handlePassword()
// Don't return the password for security reasons
server->send(200, "text/plain", "");
} else if (server->method() == HTTP_POST) {
if(server->args() == 0) {
server->send(400, "text/plain", "No argument given");
if(!server->hasArg("password")) {
server->send(400, "text/plain", "No password given");
return;
}
password_s = server->arg("password");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment