Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide AP password in the config page and on console #493

Merged
merged 4 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pio/lib/WiFiManagerKT/WiFiManagerKT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ void WiFiManager::setupConfigPortal()
DEBUG_WM(F("Invalid AccessPoint password. Ignoring"));
_apPassword = NULL;
}
DEBUG_WM(_apPassword);
//Don't show ap password on the console
//DEBUG_WM(_apPassword);
}

//optional soft ip config
Expand Down Expand Up @@ -691,7 +692,8 @@ void WiFiManager::handleWifi()
page += FPSTR(HTTP_FORM_START1);
page += _ssid;
page += FPSTR(HTTP_FORM_START2);
page += _pass;
// don't send existing password to web
//page += _pass;
wvolz marked this conversation as resolved.
Show resolved Hide resolved
page += FPSTR(HTTP_FORM_START3);

char parLength[2];
Expand Down
2 changes: 1 addition & 1 deletion pio/lib/WiFiManagerKT/WiFiManagerKT.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const char HTTP_ITEM[] PROGMEM = "<div><a href=\"#p\" onclick=\"c(this)\">{v}</a
const char JSON_ITEM[] PROGMEM = "{\"SSID\":\"{v}\", \"Encryption\":{i}, \"Quality\":\"{r}\"}";
// const char HTTP_FORM_START[] PROGMEM = "<form method=\"get\" action=\"wifisave\"><label>SSID</label><input id=\"s\" name=\"s\" length=32 placeholder=\"SSID\"><label>Password</label><input id=\"p\" name=\"p\" length=64 placeholder=\"password\">";
const char HTTP_FORM_START1[] PROGMEM = "<form method=\"get\" action=\"wifisave\"><label>SSID</label><input id=\"s\" name=\"s\" length=32 placeholder=\"SSID\" value=\"";
const char HTTP_FORM_START2[] PROGMEM = "\"><label>Password</label><input id=\"p\" name=\"p\" length=64 placeholder=\"password\" value=\"";
const char HTTP_FORM_START2[] PROGMEM = "\"><label>Password</label><input id=\"p\" name=\"p\" type=\"password\" length=64 placeholder=\"password\" value=\"";
const char HTTP_FORM_START3[] PROGMEM = "\">";

const char HTTP_FORM_LABEL[] PROGMEM = "<label for=\"{i}\">{p}</label>";
Expand Down