Procházet zdrojové kódy

Minor Fix related to MD5 param check

Ayush Sharma před 5 roky
rodič
revize
51cdbe4641
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      src/AsyncElegantOTA.h

+ 2 - 3
src/AsyncElegantOTA.h

@@ -91,12 +91,11 @@ class AsyncElegantOtaClass{
                 }
 
                 if (!index) {
-                    if(request->hasParam("MD5", true)) {
+                    if(!request->hasParam("MD5", true)) {
                         return request->send(400, "text/plain", "MD5 parameter missing");
                     }
 
-                    const String sentMd5 = request->getParam("MD5", true)->value();
-                    if(!Update.setMD5(sentMd5.c_str())) {
+                    if(!Update.setMD5(request->getParam("MD5", true)->value().c_str())) {
                         return request->send(400, "text/plain", "MD5 parameter invalid");
                     }