summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2022-04-07 15:39:14 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-07 15:39:14 +0000
commit49f031ea4d076231044da9277bc67523aa457ff4 (patch)
tree4632f36eb5f0d7c7b6cdd2890630b46f9f3c0db7
parent6b36ce68955f33b0cc5a7d9c417e1901eeeb39fb (diff)
parent4f319df8ff5a4b9f2bc62cb17df972e40b57fc81 (diff)
downloadbase-49f031ea4d076231044da9277bc67523aa457ff4.tar.gz
Disallow PAP authentication when MPPE is requested am: 4f319df8ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17614780 Change-Id: I9447047994de63d7e1f0ea09caf41093126c4228 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 9edb0e440baa..8f9b5ca26e1b 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -2157,6 +2157,13 @@ public class Vpn {
"usepeerdns", "idle", "1800", "mtu", "1400", "mru", "1400",
(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: