Release of WLED v0.11.1

Fixed AP hide not saving (fixes #1520)
Fixed MQTT password re-transmitted to HTML
Hide Update buttons while uploading, accept .bin
Make sure AP password is at least 8 characters long
This commit is contained in:
cschwinne 2020-12-19 17:09:39 +01:00
parent c277ebb43e
commit 5d6b97a63e
11 changed files with 845 additions and 814 deletions

View File

@ -1,5 +1,15 @@
## WLED changelog ## WLED changelog
### WLED release 0.11.1
#### Build 2012180
- Release of WLED 0.11.1 "Mirai"
- Fixed AP hide not saving (fixes #1520)
- Fixed MQTT password re-transmitted to HTML
- Hide Update buttons while uploading, accept .bin
- Make sure AP password is at least 8 characters long
### Development versions after 0.11.0 release ### Development versions after 0.11.0 release
#### Build 2012160 #### Build 2012160

View File

@ -1,6 +1,6 @@
{ {
"name": "wled", "name": "wled",
"version": "0.11.0", "version": "0.11.1",
"description": "Tools for WLED project", "description": "Tools for WLED project",
"main": "tools/cdata.js", "main": "tools/cdata.js",
"directories": { "directories": {

View File

@ -366,6 +366,7 @@ void serializeConfig() {
ap[F("ssid")] = apSSID; ap[F("ssid")] = apSSID;
ap[F("pskl")] = strlen(apPass); ap[F("pskl")] = strlen(apPass);
ap[F("chan")] = apChannel; ap[F("chan")] = apChannel;
ap[F("hide")] = apHide;
ap[F("behav")] = apBehavior; ap[F("behav")] = apBehavior;
JsonArray ap_ip = ap.createNestedArray("ip"); JsonArray ap_ip = ap.createNestedArray("ip");

View File

@ -1294,12 +1294,16 @@ function loadBg(iUrl) {
let bg = document.getElementById('bg'); let bg = document.getElementById('bg');
let img = document.createElement("img"); let img = document.createElement("img");
img.src = iUrl; img.src = iUrl;
if (iUrl == "") {
var today = new Date();
if (today.getMonth() == 11 && (today.getDate() > 23 && today.getDate() < 28)) img.src = "https://aircoookie.github.io/xmas.png";
}
img.addEventListener('load', (event) => { img.addEventListener('load', (event) => {
var a = parseFloat(cfg.theme.alpha.bg); var a = parseFloat(cfg.theme.alpha.bg);
d.getElementById('staytop2').style.background = "transparent"; d.getElementById('staytop2').style.background = "transparent";
if (isNaN(a)) a = 0.6; if (isNaN(a)) a = 0.6;
bg.style.opacity = a; bg.style.opacity = a;
bg.style.backgroundImage = `url(${iUrl})`; bg.style.backgroundImage = `url(${img.src})`;
img = null; img = null;
}); });
} }

View File

@ -51,7 +51,7 @@
<h3>Configure Access Point</h3> <h3>Configure Access Point</h3>
AP SSID (leave empty for no AP):<br> <input name="AS" maxlength="32"><br> AP SSID (leave empty for no AP):<br> <input name="AS" maxlength="32"><br>
Hide AP name: <input type="checkbox" name="AH"><br> Hide AP name: <input type="checkbox" name="AH"><br>
AP password (leave empty for open):<br> <input type="password" name="AP" maxlength="63"><br> AP password (leave empty for open):<br> <input type="password" name="AP" maxlength="63" pattern="(.{8,63})|()" title="Empty or min. 8 characters"><br>
Access Point WiFi channel: <input name="AC" type="number" min="1" max="13" required><br> Access Point WiFi channel: <input name="AC" type="number" min="1" max="13" required><br>
AP opens: AP opens:
<select name="AB"> <select name="AB">

View File

@ -4,7 +4,9 @@
<head> <head>
<meta content='width=device-width' name='viewport'> <meta content='width=device-width' name='viewport'>
<title>WLED Update</title> <title>WLED Update</title>
<script>function B() { window.history.back() }</script> <script>function B() { window.history.back() }
function U() {document.getElementById("uf").style.display="none";document.getElementById("msg").style.display="block";}
</script>
<style> <style>
.bt { .bt {
background: #333; background: #333;
@ -28,16 +30,23 @@
color: #fff; color: #fff;
line-height: 200% line-height: 200%
} }
#msg {
display: none;
}
</style> </style>
</head> </head>
<body> <body>
<h2>WLED Software Update</h2>Installed version: ##VERSION##<br>Download the latest binary: <a <h2>WLED Software Update</h2>
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img <form method='POST' action='/update' id='uf' enctype='multipart/form-data' onsubmit="U()">
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br> Installed version: ##VERSION##<br>
<form method='POST' action='/update' enctype='multipart/form-data'><input type='file' class="bt" name='update' Download the latest binary: <a href="https://github.com/Aircoookie/WLED/releases" target="_blank">
required><br><input type='submit' class="bt" value='Update!'></form><button type="button" class="bt" <img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br>
onclick="B()">Back</button> <input type='file' class="bt" name='update' accept=".bin" required><br>
<input type='submit' class="bt" value='Update!' ><br>
<button type="button" class="bt" onclick="B()">Back</button></form>
<div id="msg"><b>Updating...</b><br>Please do not close or refresh the page :)</div>
</body> </body>
</html> </html>

View File

@ -36,17 +36,19 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
// Autogenerated from wled00/data/update.htm, do not edit!! // Autogenerated from wled00/data/update.htm, do not edit!!
const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta content="width=device-width" name="viewport"> const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta content="width=device-width" name="viewport">
<title>WLED Update</title><script>function B(){window.history.back()}</script> <title>WLED Update</title><script>
<style> function B(){window.history.back()}function U(){document.getElementById("uf").style.display="none",document.getElementById("msg").style.display="block"}
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%} </script><style>
</style></head><body><h2>WLED Software Update</h2>Installed version: 0.11.0<br> .bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}
Download the latest binary: <a </style></head><body><h2>WLED Software Update</h2><form method="POST"
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
Installed version: 0.11.1<br>Download the latest binary: <a
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"> src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square">
</a><br><form method="POST" action="/update" enctype="multipart/form-data"> </a><br><input type="file" class="bt" name="update" accept=".bin" required><br>
<input type="file" class="bt" name="update" required><br><input type="submit" <input type="submit" class="bt" value="Update!"><br><button type="button"
class="bt" value="Update!"></form><button type="button" class="bt" class="bt" onclick="B()">Back</button></form><div id="msg"><b>Updating...</b>
onclick="B()">Back</button></body></html>)====="; <br>Please do not close or refresh the page :)</div></body></html>)=====";
// Autogenerated from wled00/data/welcome.htm, do not edit!! // Autogenerated from wled00/data/welcome.htm, do not edit!!

View File

@ -53,8 +53,9 @@ maxlength="32"> .local<br>Client IP: <span class="sip">Not connected</span><br>
<h3>Configure Access Point</h3>AP SSID (leave empty for no AP):<br><input <h3>Configure Access Point</h3>AP SSID (leave empty for no AP):<br><input
name="AS" maxlength="32"><br>Hide AP name: <input type="checkbox" name="AH"><br> name="AS" maxlength="32"><br>Hide AP name: <input type="checkbox" name="AH"><br>
AP password (leave empty for open):<br><input type="password" name="AP" AP password (leave empty for open):<br><input type="password" name="AP"
maxlength="63"><br>Access Point WiFi channel: <input name="AC" type="number" maxlength="63" pattern="(.{8,63})|()" title="Empty or min. 8 characters"><br>
min="1" max="13" required><br>AP opens: <select name="AB"><option value="0"> Access Point WiFi channel: <input name="AC" type="number" min="1" max="13"
required><br>AP opens: <select name="AB"><option value="0">
No connection after boot</option><option value="1">Disconnected</option><option No connection after boot</option><option value="1">Disconnected</option><option
value="2">Always</option><option value="3">Never (not recommended)</option> value="2">Always</option><option value="3">Never (not recommended)</option>
</select><br>AP IP: <span class="sip">Not active</span><br><h3>Experimental</h3> </select><br>AP IP: <span class="sip">Not active</span><br><h3>Experimental</h3>
@ -359,7 +360,7 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
<h3>Software Update</h3><button type="button" onclick="U()">Manual OTA Update <h3>Software Update</h3><button type="button" onclick="U()">Manual OTA Update
</button><br>Enable ArduinoOTA: <input type="checkbox" name="AO"><br><h3>About </button><br>Enable ArduinoOTA: <input type="checkbox" name="AO"><br><h3>About
</h3><a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a> </h3><a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a>
version 0.11.0<br><br><a version 0.11.1<br><br><a
href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About" href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About"
target="_blank">Contributors, dependencies and special thanks</a><br> target="_blank">Contributors, dependencies and special thanks</a><br>
A huge thank you to everyone who helped me create WLED!<br><br> A huge thank you to everyone who helped me create WLED!<br><br>

File diff suppressed because it is too large Load Diff

View File

@ -3,12 +3,12 @@
/* /*
Main sketch, global variable declarations Main sketch, global variable declarations
@title WLED project sketch @title WLED project sketch
@version 0.11.0 @version 0.11.1
@author Christian Schwinne @author Christian Schwinne
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2012160 #define VERSION 2012180
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG
@ -173,7 +173,7 @@
#endif #endif
// Global Variable definitions // Global Variable definitions
WLED_GLOBAL char versionString[] _INIT("0.11.0"); WLED_GLOBAL char versionString[] _INIT("0.11.1");
#define WLED_CODENAME "Mirai" #define WLED_CODENAME "Mirai"
// AP and OTA default passwords (for maximum security change them!) // AP and OTA default passwords (for maximum security change them!)

View File

@ -329,7 +329,6 @@ void getSettingsJS(byte subPage, char* dest)
sappends('s',SET_F("MS"),mqttServer); sappends('s',SET_F("MS"),mqttServer);
sappend('v',SET_F("MQPORT"),mqttPort); sappend('v',SET_F("MQPORT"),mqttPort);
sappends('s',SET_F("MQUSER"),mqttUser); sappends('s',SET_F("MQUSER"),mqttUser);
sappends('s',SET_F("MQPASS"),mqttPass);
byte l = strlen(mqttPass); byte l = strlen(mqttPass);
char fpass[l+1]; //fill password field with *** char fpass[l+1]; //fill password field with ***
fpass[l] = 0; fpass[l] = 0;