Disallow PAP authentication when MPPE is requested am: 4f319df8ff am: 49f031ea4d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17614780

Change-Id: I22822a2d3c5eb82a05455175c4f901bd271aefab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Remi NGUYEN VAN
2022-04-07 15:56:13 +00:00
committed by Automerger Merge Worker

View File

@@ -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: