summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-08 17:08:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-08 17:08:58 +0000
commitaaeae36eebf7f60c3e6313040227b8007fbfda8d (patch)
treee7e015ad44f2aedf78cd93187dc0f3eeb427e64f /service
parente8a3a363d0942467d56b714bba7967b59020bdf4 (diff)
parente565c0b697b0760443aceb02f9933e2a455da616 (diff)
Merge "[Suggestion] block insecure Enterprise suggestion" into rvc-dev am: e565c0b697
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/11726421 Change-Id: I54fb324a0a82236777a48e30000ff0f56c15da11
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/NetworkSuggestionNominator.java5
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
index fbc1f5fdb..b174be5e0 100644
--- a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
+++ b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
@@ -145,6 +145,11 @@ public class NetworkSuggestionNominator implements WifiNetworkSelector.NetworkNo
}
Set<ExtendedWifiNetworkSuggestion> autojoinEnableSuggestions = new HashSet<>();
for (ExtendedWifiNetworkSuggestion ewns : matchingExtNetworkSuggestions) {
+ // Ignore insecure enterprise config.
+ if (ewns.wns.wifiConfiguration.isEnterprise()
+ && ewns.wns.wifiConfiguration.enterpriseConfig.isInsecure()) {
+ continue;
+ }
// If untrusted network is not allowed, ignore untrusted suggestion.
WifiConfiguration config = ewns.wns.wifiConfiguration;
if (!untrustedNetworkAllowed && !config.trusted) {
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index 5d5a7d782..464ced0ad 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -993,6 +993,12 @@ public class WifiNetworkSuggestionsManager {
WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
return false;
}
+ if (wns.wifiConfiguration.isEnterprise()
+ && wns.wifiConfiguration.enterpriseConfig.isInsecure()) {
+ Log.e(TAG, "Insecure enterprise suggestion is invalid.");
+ return false;
+ }
+
} else {
if (!wns.passpointConfiguration.validate()) {
return false;