mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1068468 - Truncate ssid if its length of encoded to utf8 is longer than 32. r=chulee
--HG-- extra : amend_source : 7f41d7bf31c3152e75934731d36aead919371baa
This commit is contained in:
parent
0b6d02d00a
commit
5e5056d05a
@ -3077,6 +3077,12 @@ WifiWorker.prototype = {
|
||||
debug("Invalid SSID value.");
|
||||
return null;
|
||||
}
|
||||
// Truncate ssid if its length of encoded to utf8 is longer than 32.
|
||||
while (unescape(encodeURIComponent(ssid)).length > 32)
|
||||
{
|
||||
ssid = ssid.substring(0, ssid.length-1);
|
||||
}
|
||||
|
||||
if (securityType != WIFI_SECURITY_TYPE_NONE &&
|
||||
securityType != WIFI_SECURITY_TYPE_WPA_PSK &&
|
||||
securityType != WIFI_SECURITY_TYPE_WPA2_PSK) {
|
||||
|
Loading…
Reference in New Issue
Block a user