projects
/
openwrt
/
staging
/
blocktrron.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed5dbbc
)
hostapd: do not trim trailing whitespace, except for newline
author
Felix Fietkau
<nbd@nbd.name>
Mon, 30 Oct 2023 17:32:24 +0000
(18:32 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Tue, 31 Oct 2023 12:29:32 +0000
(13:29 +0100)
Fixes adding SSID or key with trailing whitespace
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/hostapd.uc
patch
|
blob
|
history
diff --git
a/package/network/services/hostapd/files/hostapd.uc
b/package/network/services/hostapd/files/hostapd.uc
index 88f01caa93ebfd20edae3c4d1a697123d0eb9036..593840cca88fbe45b438e5eb24ca7dd2de41c87e 100644
(file)
--- a/
package/network/services/hostapd/files/hostapd.uc
+++ b/
package/network/services/hostapd/files/hostapd.uc
@@
-571,7
+571,7
@@
function iface_load_config(filename)
let bss;
let line;
- while ((line =
trim(f.read("line")
)) != null) {
+ while ((line =
rtrim(f.read("line"), "\n"
)) != null) {
let val = split(line, "=", 2);
if (!val[0])
continue;
@@
-593,7
+593,7
@@
function iface_load_config(filename)
push(config.radio.data, line);
}
- while ((line =
trim(f.read("line")
)) != null) {
+ while ((line =
rtrim(f.read("line"), "\n"
)) != null) {
if (line == "#default_macaddr")
bss.default_macaddr = true;