1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Improve detection of escaped hex bytes in ssid name

This commit is contained in:
zbchristian 2021-09-08 14:28:43 +02:00 committed by billz
parent c33cf5f81a
commit 4408940a3d

View File

@ -69,7 +69,7 @@ function DisplayWPAConfig()
}
fwrite($wpa_file, $line.PHP_EOL);
} else {
if ( strpos($ssid, "\x") !== false && strpos($line, "ssid=\"") !== false ) {
if ( preg_match('/\\\\x[0-9A-Fa-f]{2}/',$ssid) && strpos($line, "ssid=\"") !== false ) {
fwrite($wpa_file, "\tssid=P\"".$ssid."\"".PHP_EOL);
} else {
fwrite($wpa_file, $line.PHP_EOL);