mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 11:00:37 +08:00
Add \n if not present in web commands
This commit is contained in:
parent
fd9322aca9
commit
4aa503741f
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
//version and sources location
|
||||
#define FW_VERSION "3.0.0.a35"
|
||||
#define FW_VERSION "3.0.0.a36"
|
||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||
|
||||
#endif //_VERSION_ESP3D_H
|
||||
|
@ -39,6 +39,7 @@ void HTTP_Server::handle_web_command ()
|
||||
if (_webserver->hasArg ("cmd")) {
|
||||
cmd = _webserver->arg ("cmd");
|
||||
ESP3DOutput output(_webserver);
|
||||
if(!cmd.endsWith("\n")) cmd+="\n";//need to validate command
|
||||
esp3d_commands.process((uint8_t*)cmd.c_str(), cmd.length(), &output, auth_level);
|
||||
} else {
|
||||
_webserver->send (400, "text/plain", "Invalid command");
|
||||
|
Loading…
x
Reference in New Issue
Block a user