summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2022-04-07 16:11:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-07 16:11:58 +0000
commitc14e995495c1113210d9f5196ac311c1875cebd2 (patch)
tree7acb4fa026b3b5bc72916e2760f5dc33bb2a5125
parent4636aea564090a85ff7ba83fde30cd5ace6508f6 (diff)
parent2f745097899b303473506e40102fc30d44471652 (diff)
downloadbase-c14e995495c1113210d9f5196ac311c1875cebd2.tar.gz
Disallow PAP authentication when MPPE is requested am: 4f319df8ff am: 49f031ea4d am: 2f74509789
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17614780 Change-Id: Ie1230d9ce9e590b6174ce9d28cc0106d0058b64a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/connectivity/Vpn.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 3762ccaae13b..1bd158dfe96e 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -2242,6 +2242,13 @@ public class Vpn {
"usepeerdns", "idle", "1800", "mtu", "1270", "mru", "1270",
(profile.mppe ? "+mppe" : "nomppe"),
};
+ if (profile.mppe) {
+ // Disallow PAP authentication when MPPE is requested, as MPPE cannot work
+ // with PAP anyway, and users may not expect PAP (plain text) to be used when
+ // MPPE was requested.
+ mtpd = Arrays.copyOf(mtpd, mtpd.length + 1);
+ mtpd[mtpd.length - 1] = "-pap";
+ }
break;
case VpnProfile.TYPE_L2TP_IPSEC_PSK:
case VpnProfile.TYPE_L2TP_IPSEC_RSA: