Bug 790054 - Don't offer to connect to WPA-EAP access points. Continue to allow connecting to already-configured access points. r=vchang

This commit is contained in:
Blake Kaplan 2012-12-21 16:57:05 -05:00
Родитель 0900576d4c
Коммит 9da238bbcd
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -2046,9 +2046,9 @@ function WifiWorker() {
// results, add it to the list along with any other information.
// Also, we use the highest signal strength that we see.
let network = new ScanResult(ssid, bssid, flags, signalLevel);
self.networksArray.push(network);
let networkKey = getNetworkKey(network);
let eapIndex = -1;
if (networkKey in self.configuredNetworks) {
let known = self.configuredNetworks[networkKey];
network.known = true;
@ -2063,8 +2063,20 @@ function WifiWorker() {
("wep_key0" in known && known.wep_key0)) {
network.password = "*";
}
} else if ((eapIndex = network.capabilities.indexOf("WPA-EAP")) >= 0) {
// Don't offer to connect to WPA-EAP networks unless one has been
// configured through other means (e.g. it was added directly to
// wpa_supplicant.conf). Here, we have an unknown WPA-EAP network,
// so we ignore it entirely if it only supports WPA-EAP, otherwise
// we take EAP out of the list and offer the rest of the
// capabilities.
if (network.capabilities.length === 1)
continue;
network.capabilities.splice(eapIndex, 1);
}
self.networksArray.push(network);
if (network.bssid === WifiManager.connectionInfo.bssid)
network.connected = true;