Closed Bug 343059 Opened 18 years ago Closed 16 years ago

In <phishingDetector.js>, "Warning: assignment to undeclared variable linkTextURL"

Categories

(MailNews Core :: Security, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

(Keywords: fixed-seamonkey1.1a)

Attachments

(2 files)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a3) Gecko/20060628 SeaMonkey/1.1a] (nightly) (W98SE)

When I click on a link in a newsgroup, I can get the following warnings.
[
Warning: assignment to undeclared variable hrefURL
Source File: chrome://messenger/content/phishingDetector.js
Line: 109

Warning: assignment to undeclared variable linkTextURL
Source File: chrome://messenger/content/phishingDetector.js
Line: 150
]
It seems to happen only the first time in a session.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060711 SeaMonkey/1.1a] (nightly) (W98SE)

Got it clicking on a link in a mail this time.
The hrefURL was fixed on trunk by bug 307142; the linkTextURL is broken on trunk, too.
Depends on: 307142
Version: 1.8 Branch → Trunk
With bug 307142 fixed on branch now, let's leave this bug here for the remaining linkTextURL issue.
*Adds a missing |var|.
*1 space nit.
*3 synchronizations with ThunderBird.
Assignee: mail → gautheri
Status: NEW → ASSIGNED
Attachment #229126 - Flags: superreview?
Attachment #229126 - Flags: review?(iann_bugzilla)
Attachment #229126 - Flags: superreview? → superreview?(bienvenu)
Component: MailNews: Main Mail Window → MailNews: Security
Product: Mozilla Application Suite → Core
Summary: In <phishingDetector.js>, 2 "Warning: assignment to undeclared variable" → In <phishingDetector.js>, "Warning: assignment to undeclared variable linkTextURL"
Target Milestone: --- → mozilla1.8.1beta2
*Various (spaces, spelling, code) synchronizations with SeaMonkey.
*Adds a missing |var|.
Attachment #229131 - Flags: superreview?(bienvenu)
Attachment #229131 - Flags: review?(bienvenu)
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

>@@ -220,21 +219,21 @@ function isIPv4HostName(aHostName)
>   var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);  // IPv4
>   // treat 0.0.0.0 as an invalid IP address
>   return ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0';
> }
> 
> // returns true if the user confirms the URL is a scam
> function confirmSuspiciousURL(aPhishingType, aSuspiciousHostName)
> {
>   var brandShortName = gBrandBundle.getString("brandShortName");
>   var titleMsg = gMessengerBundle.getString("confirmPhishingTitle");
>-  var dialogMsg = null;
>+  var dialogMsg;

As was stated in the patch for bug 296758:
"var dialogMsg = null; 

is somewhat 'nicer' than calling ConfirmEx with an 'undefined' value."

So please change the TB patch to have "var dialogMsg = null;" rather than removing it from the mailnews version.
Attachment #229126 - Flags: superreview?(bienvenu)
Attachment #229126 - Flags: review?(iann_bugzilla)
Attachment #229126 - Flags: review-
You're quoting your bug 296758 comment 7;
but, even in that patch, I fail to understand how the debated |null| initial value can survive the switch statement which follows it;
hence, it seems logical to remove it as unneeded, is it not ?
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

true, r=me
Attachment #229126 - Flags: review- → review+
Attachment #229126 - Flags: superreview?(bienvenu)
Attachment #229126 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]


Checkin: {
2006-07-20 09:48	bugzilla%standard8.demon.co.uk 	mozilla/mailnews/base/resources/content/phishingDetector.js 	1.7
}

'approval1.8.1=?': (SeaMonkey only)
Trivial strict warning fix, no risk.
Attachment #229126 - Attachment description: (Av1-SM) <phishingDetector.js> → (Av1-SM) <phishingDetector.js> [Checkin: Comment 10]
Attachment #229126 - Flags: approval1.8.1?
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

a=dbaron on behalf of drivers.  Please check in to MOZILLA_1_8_BRANCH and mark fixed1.8.1 after doing so.
Attachment #229126 - Flags: approval1.8.1? → approval1.8.1+
Whiteboard: [checkin needed (1.8 branch)]
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

Checking in (1.8 branch)
phishingDetector.js;
new revision: 1.1.2.6; previous revision: 1.1.2.5
done
Attachment #229126 - Attachment description: (Av1-SM) <phishingDetector.js> [Checkin: Comment 10] → (Av1-SM) <phishingDetector.js> [Checkin: Comment 10 & 12]
Marking as fixed-seamonkey1.1a only as until TB patch is in won't be fixed1.8.1
Attachment #229126 - Attachment is obsolete: true
OS: Windows 98 → All
Hardware: PC → All
Whiteboard: [checkin needed (1.8 branch)] → [review needed: Bv1-TB]
Comment on attachment 229131 [details] [diff] [review]
(Bv1-TB) <phishingDetector.js>
[Checkin: Comment 16]

thx for the patch
Attachment #229131 - Flags: superreview?(bienvenu)
Attachment #229131 - Flags: superreview+
Attachment #229131 - Flags: review?(bienvenu)
Attachment #229131 - Flags: review+
Comment on attachment 229131 [details] [diff] [review]
(Bv1-TB) <phishingDetector.js>
[Checkin: Comment 16]


'approval&#8209;thunderbird2=?': (Thunderbird only)
Trivial strict warning fix,  sync'ing with SeaMonkey, no risk.
Attachment #229131 - Flags: approval-thunderbird2?
Whiteboard: [review needed: Bv1-TB] → [checkin needed: Bv1-TB]
Comment on attachment 229131 [details] [diff] [review]
(Bv1-TB) <phishingDetector.js>
[Checkin: Comment 16]


Checkin: {
2006-08-04 05:45	bugzilla%standard8.demon.co.uk 	mozilla/mail/base/content/phishingDetector.js 	1.20
}
Attachment #229131 - Attachment description: (Bv1-TB) <phishingDetector.js> → (Bv1-TB) <phishingDetector.js> [Checkin: Comment 16]
Whiteboard: [checkin needed: Bv1-TB]
Comment on attachment 229131 [details] [diff] [review]
(Bv1-TB) <phishingDetector.js>
[Checkin: Comment 16]

I suspect this patch won't apply cleanly on the branch any more given the phishing detector overhaul to phishingDetector.js
Attachment #229131 - Flags: approval-thunderbird2? → approval-thunderbird2-
Assignee: sgautherie.bz → nobody
Status: ASSIGNED → NEW
QA Contact: security
Attachment #229126 - Attachment is obsolete: false
serge, still more to go?
Assignee: nobody → sgautherie.bz
Target Milestone: mozilla1.8.1beta2 → mozilla1.9.1a1
Status: NEW → ASSIGNED
R.Fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #18)
> serge, still more to go?

No: it seems I had forgotten or given up on the TB v2 branch.
Thanks.
Target Milestone: mozilla1.9.1a1 → mozilla1.9
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: