ported from mozilla: Bug 1538409 - implement oAuth authentication for POP accounts r=benc a=mkmelin (f6219b04be)

This commit is contained in:
roytam1 2024-09-21 18:23:52 +08:00
commit 08feac8e97
6 changed files with 212 additions and 35 deletions

View file

@ -30,10 +30,12 @@ function onInit(aPageId, aServerId)
if (serverType == "imap")
setupImapDeleteUI(aServerId);
// TLS Cert (External) and OAuth2 are only supported on IMAP.
#ifdef MOZ_MAILNEWS_OAUTH2
document.getElementById("authMethod-oauth2").hidden = (serverType != "imap");
// OAuth2 are only supported on IMAP and POP.
document.getElementById("authMethod-oauth2").hidden =
serverType != "imap" && serverType != "pop3";
#endif
// TLS Cert (External) and OAuth2 are only supported on IMAP.
document.getElementById("authMethod-external").hidden = (serverType != "imap");
// "STARTTLS, if available" is vulnerable to MITM attacks so we shouldn't