Skip to content

Commit 30a686c

Browse files
author
dingo35
committed
network.cpp: remove SSID input validation routine since everything is allowed
1 parent d56399e commit 30a686c

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

SmartEVSE-3/src/network.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,6 @@ char *downloadUrl = NULL;
6868
int downloadProgress = 0;
6969
int downloadSize = 0;
7070

71-
bool isValidInput(String input) {
72-
// Check if the input contains only alphanumeric characters, underscores, and hyphens
73-
for (char c : input) {
74-
if (!isalnum(c) && c != '_' && c != '-') {
75-
return false;
76-
}
77-
}
78-
return true;
79-
}
80-
8171
static uint8_t CliState = 0;
8272
#ifdef SENSORBOX_VERSION
8373
void ProvisionCli(HardwareSerial &s) {
@@ -103,12 +93,8 @@ void ProvisionCli(HWCDC &s = Serial) {
10393

10494
} else if (CliState == 1 && entered) {
10595
Router_SSID = String(CliBuffer);
106-
Router_SSID.trim();
107-
if (!isValidInput(Router_SSID)) {
108-
s.println("Invalid characters in SSID.");
109-
Router_SSID = "";
110-
CliState = 0;
111-
} else CliState++; // All OK, now request password.
96+
Router_SSID.trim(); //SSID has no limitations on special characters, so dnt check them
97+
CliState++; // All OK, now request password.
11298
idx = 0;
11399
entered = false;
114100

0 commit comments

Comments
 (0)