mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-11 06:54:21 +00:00
hostapd: do not trim trailing whitespace, except for newline
Fixes adding SSID or key with trailing whitespace Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
ed5dbbc129
commit
a2d8226c4f
@ -571,7 +571,7 @@ function iface_load_config(filename)
|
|||||||
|
|
||||||
let bss;
|
let bss;
|
||||||
let line;
|
let line;
|
||||||
while ((line = trim(f.read("line"))) != null) {
|
while ((line = rtrim(f.read("line"), "\n")) != null) {
|
||||||
let val = split(line, "=", 2);
|
let val = split(line, "=", 2);
|
||||||
if (!val[0])
|
if (!val[0])
|
||||||
continue;
|
continue;
|
||||||
@ -593,7 +593,7 @@ function iface_load_config(filename)
|
|||||||
push(config.radio.data, line);
|
push(config.radio.data, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((line = trim(f.read("line"))) != null) {
|
while ((line = rtrim(f.read("line"), "\n")) != null) {
|
||||||
if (line == "#default_macaddr")
|
if (line == "#default_macaddr")
|
||||||
bss.default_macaddr = true;
|
bss.default_macaddr = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user