Bug 1596413 - after confirmation to follow possible scam link, use the right actions for yes/no. r+a=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 15 Nov 2019 11:59:02 +0200
changeset 37289 36d1b3baee13f60766e29d35d0a40dca4264f61a
parent 37288 7bb6da6c0d78f9daa10fdb75557566ac76d8f02a
child 37290 378cbfce1aed14fe7f848c2cdc91e6480b85949a
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
bugs1596413
Bug 1596413 - after confirmation to follow possible scam link, use the right actions for yes/no. r+a=jorgk
mail/base/content/phishingDetector.js
--- a/mail/base/content/phishingDetector.js
+++ b/mail/base/content/phishingDetector.js
@@ -293,23 +293,24 @@ var gPhishingDetector = {
       let dialogMsg = bundle.getFormattedString(
         "confirmPhishingUrl",
         [brandShortName, unobscuredHostNameValue],
         2
       );
       let warningButtons =
         Ci.nsIPromptService.STD_YES_NO_BUTTONS +
         Ci.nsIPromptService.BUTTON_POS_1_DEFAULT;
-      return Services.prompt.confirmEx(
+      let button = Services.prompt.confirmEx(
         window,
         titleMsg,
         dialogMsg,
         warningButtons,
         "",
         "",
         "",
         "",
         {}
       );
+      return button == 0 ? 2 : 1; // 2 == allow, 1 == block
     }
     return 2; // allow the link to load
   },
 };