mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
parent
f5a18b8d95
commit
92e154fa64
2 changed files with 8 additions and 0 deletions
|
@ -641,3 +641,10 @@ function validate_host($host) {
|
|||
return preg_match('/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i', $host);
|
||||
}
|
||||
|
||||
function evalHexSequence($string) {
|
||||
$evaluator = function ($input) {
|
||||
return hex2bin($input[1]);
|
||||
};
|
||||
return preg_replace_callback('/\\\x(..)/', $evaluator, $string);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ function nearbyWifiStations(&$networks, $cached = true)
|
|||
}
|
||||
|
||||
$ssid = trim($arrNetwork[4]);
|
||||
$ssid = evalHexSequence($ssid);
|
||||
// filter SSID string: anything invisible in 7bit ASCII or quotes -> ignore network
|
||||
if (preg_match('[\x00-\x1f\x7f-\xff\'\`\´\"]', $ssid)) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue