From ab3519a6372e879e726d08a119b608a404982ad5 Mon Sep 17 00:00:00 2001 From: "bugzilla%arlen.demon.co.uk" Date: Mon, 8 Aug 2005 18:29:12 +0000 Subject: [PATCH] Bug 296758 Adding phishing detection to mailnews p=me r=mnyromyr sr=bienvenu a=asa git-svn-id: svn://10.0.0.236/trunk@177340 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/mail3PaneWindowCommands.js | 14 +- .../content/mail3PaneWindowVertLayout.xul | 5 +- .../base/resources/content/mailWindow.js | 67 ++--- .../resources/content/mailWindowOverlay.js | 192 +++++++++++--- .../resources/content/mailWindowOverlay.xul | 61 ++++- .../base/resources/content/messageWindow.js | 12 + .../base/resources/content/messageWindow.xul | 5 +- .../base/resources/content/messenger.xul | 5 +- .../resources/content/msgHdrViewOverlay.js | 3 + .../resources/content/msgMail3PaneWindow.js | 5 +- .../resources/content/phishingDetector.js | 239 ++++++++++++++++++ .../base/resources/locale/en-US/messenger.dtd | 17 +- .../locale/en-US/messenger.properties | 6 + mozilla/mailnews/jar.mn | 1 + mozilla/mailnews/mailnews.js | 1 + mozilla/themes/classic/jar.mn | 1 + .../messenger/icons/remote-blocked.png | Bin 0 -> 2205 bytes .../classic/messenger/primaryToolbar.css | 23 +- mozilla/themes/modern/jar.mn | 1 + .../modern/messenger/icons/remote-blocked.png | Bin 0 -> 2170 bytes .../modern/messenger/primaryToolbar.css | 24 +- .../resources/content/contentAreaClick.js | 26 +- 22 files changed, 599 insertions(+), 109 deletions(-) create mode 100755 mozilla/mailnews/base/resources/content/phishingDetector.js create mode 100755 mozilla/themes/classic/messenger/icons/remote-blocked.png create mode 100755 mozilla/themes/modern/messenger/icons/remote-blocked.png diff --git a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js index f9b51172b67..4b7202e8140 100644 --- a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js +++ b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js @@ -210,6 +210,8 @@ var DefaultController = case "cmd_markAsJunk": case "cmd_markAsNotJunk": case "cmd_recalculateJunkScore": + case "cmd_markAsShowRemote": + case "cmd_markAsNotPhish": case "cmd_applyFilters": case "cmd_runJunkControls": case "cmd_deleteJunk": @@ -322,12 +324,16 @@ var DefaultController = case "cmd_markAsFlagged": case "button_file": case "cmd_file": - return (GetNumSelectedMessages() > 0 ); + return (GetNumSelectedMessages() > 0); case "cmd_markAsJunk": case "cmd_markAsNotJunk": case "cmd_recalculateJunkScore": // can't do news on junk yet. return (GetNumSelectedMessages() > 0 && !isNewsURI(GetFirstSelectedMessage())); + case "cmd_markAsShowRemote": + return (GetNumSelectedMessages() > 0 && checkMsgHdrPropertyIsNot("remoteContentPolicy", kAllowRemoteContent)); + case "cmd_markAsNotPhish": + return (GetNumSelectedMessages() > 0 && checkMsgHdrPropertyIsNot("notAPhishMessage", kNotAPhishMessage)); case "cmd_applyFilters": if (gDBView) gDBView.getCommandStatus(nsMsgViewCommandType.applyFilters, enabled, checkStatus); @@ -633,6 +639,12 @@ var DefaultController = case "cmd_recalculateJunkScore": analyzeMessagesForJunk(); return; + case "cmd_markAsShowRemote": + LoadMsgWithRemoteContent(); + return; + case "cmd_markAsNotPhish": + MsgIsNotAScam(); + return; case "cmd_applyFilters": MsgApplyFilters(null); return; diff --git a/mozilla/mailnews/base/resources/content/mail3PaneWindowVertLayout.xul b/mozilla/mailnews/base/resources/content/mail3PaneWindowVertLayout.xul index b694dee2270..ccd3adaa07a 100644 --- a/mozilla/mailnews/base/resources/content/mail3PaneWindowVertLayout.xul +++ b/mozilla/mailnews/base/resources/content/mail3PaneWindowVertLayout.xul @@ -84,6 +84,7 @@