Skip to content

Display and control your Android device

Reject arguments containing new line characters

Romain Vimonte03888d5877e
diff --git a/app/src/server.c b/app/src/server.c
index e94fcce8..90a0ac5d 100644
--- a/app/src/server.c
+++ b/app/src/server.c
@@ -225,7 +225,7 @@ validate_string(const char *s) {
// special shell characters.
// Since they are not properly escaped on Windows anyway (see
// sys/win/process.c), just forbid special shell characters.
- if (strpbrk(s, " ;'\"*$?&`#\\|<>[]{}()!~")) {
+ if (strpbrk(s, " ;'\"*$?&`#\\|<>[]{}()!~\r\n")) {
LOGE("Invalid server param: [%s]", s);
return false;
}