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

RESOLVED FIXED in mozilla1.9

Status

MailNews Core
Security
--
minor
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

({fixed-seamonkey1.1a})

Trunk
mozilla1.9
fixed-seamonkey1.1a

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

12 years ago
[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
]
(Assignee)

Comment 1

12 years ago
It seems to happen only the first time in a session.
(Assignee)

Comment 2

12 years ago
[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.

Comment 3

12 years ago
The hrefURL was fixed on trunk by bug 307142; the linkTextURL is broken on trunk, too.
(Assignee)

Updated

12 years ago
Depends on: 307142
Version: 1.8 Branch → Trunk

Comment 4

12 years ago
With bug 307142 fixed on branch now, let's leave this bug here for the remaining linkTextURL issue.
(Assignee)

Comment 5

12 years ago
Created attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

*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)
(Assignee)

Updated

12 years ago
Attachment #229126 - Flags: superreview? → superreview?(bienvenu)
(Assignee)

Updated

12 years ago
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
(Assignee)

Comment 6

12 years ago
Created attachment 229131 [details] [diff] [review]
(Bv1-TB) <phishingDetector.js>
[Checkin: Comment 16]

*Various (spaces, spelling, code) synchronizations with SeaMonkey.
*Adds a missing |var|.
Attachment #229131 - Flags: superreview?(bienvenu)
Attachment #229131 - Flags: review?(bienvenu)

Comment 7

12 years ago
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-
(Assignee)

Comment 8

12 years ago
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 9

12 years ago
Comment on attachment 229126 [details] [diff] [review]
(Av1-SM) <phishingDetector.js>
[Checkin: Comment 10 & 12]

true, r=me
Attachment #229126 - Flags: review- → review+
(Assignee)

Updated

12 years ago
Attachment #229126 - Flags: superreview?(bienvenu)

Updated

12 years ago
Attachment #229126 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Comment 10

12 years ago
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+
(Assignee)

Updated

12 years ago
Whiteboard: [checkin needed (1.8 branch)]

Comment 12

12 years ago
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]

Comment 13

12 years ago
Marking as fixed-seamonkey1.1a only as until TB patch is in won't be fixed1.8.1
Keywords: fixed-seamonkey1.1a
(Assignee)

Updated

12 years ago
Attachment #229126 - Attachment is obsolete: true
(Assignee)

Updated

12 years ago
OS: Windows 98 → All
Hardware: PC → All
Whiteboard: [checkin needed (1.8 branch)] → [review needed: Bv1-TB]

Comment 14

12 years ago
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+
(Assignee)

Comment 15

12 years ago
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?
(Assignee)

Updated

12 years ago
Whiteboard: [review needed: Bv1-TB] → [checkin needed: Bv1-TB]
(Assignee)

Comment 16

12 years ago
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]
(Assignee)

Updated

12 years ago
Whiteboard: [checkin needed: Bv1-TB]

Comment 17

12 years ago
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-

Updated

10 years ago
Assignee: sgautherie.bz → nobody
Status: ASSIGNED → NEW
QA Contact: security
(Assignee)

Updated

10 years ago
Attachment #229126 - Attachment is obsolete: false

Comment 18

10 years ago
serge, still more to go?
Assignee: nobody → sgautherie.bz
(Assignee)

Updated

10 years ago
Target Milestone: mozilla1.8.1beta2 → mozilla1.9.1a1
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 19

10 years ago
R.Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Comment 20

10 years ago
(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.
(Assignee)

Updated

10 years ago
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.