Closed Bug 251675 Opened 20 years ago Closed 20 years ago

isInNet's IPv4 address validator nit

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: benc, Assigned: anders)

Details

(Whiteboard: [good first bug])

Attachments

(1 file, 1 obsolete file)

"    var test = /^(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})\\.(\\d{1,4})$/(ipaddr);\n"+

you only need "d{1,3}" for octets, they are only 3 digits long.
patches welcome.
Keywords: helpwanted
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [good first bug]
Target Milestone: --- → Future
I'll do this.
Status: NEW → ASSIGNED
The file that needs fixing here is netwerk/base/src/nsProxyAutoConfig.js; the
isInNet() function.
Attached patch Initial patch (obsolete) — Splinter Review
My first patch for Mozilla. Wasn't sure who to set as reviewer, so left blank.

This *should* do the trick though. Any feedback appreciated.
Attachment #171773 - Flags: review?
Comment on attachment 171773 [details] [diff] [review]
Initial patch

Anders, you can check http://www.mozilla.org/owners.html for the list of module
owners. I have marked r?darin for you.
Attachment #171773 - Flags: review? → review?(darin)
hm, how did you create the patch? it doesn't look like it will apply - where's
the space in the first column gone?
(In reply to comment #6)
> hm, how did you create the patch? it doesn't look like it will apply - where's

cvs diff -u8pn

> the space in the first column gone?

?? Good question. Checking the original code, each line does start with a double
quote. The diff was pasted into the attached txt file (Initial patch), as
generated. Did I manage to miss anything?
> The diff was pasted into the attached txt file 

oh... usually, you'd redirect to a file, like:
  cvs diff -u8p > patch.diff
Second try.. :D
Attachment #171773 - Attachment is obsolete: true
Attachment #171987 - Flags: review?(darin)
Attachment #171987 - Attachment is patch: true
Attachment #171987 - Attachment mime type: application/octet-stream → text/plain
Attachment #171773 - Flags: review?(darin)
Comment on attachment 171987 [details] [diff] [review]
Second try in creating a patch

makes sense, r=darin
Attachment #171987 - Flags: review?(darin) → review+
Assignee: darin → anders
Status: ASSIGNED → NEW
Comment on attachment 171987 [details] [diff] [review]
Second try in creating a patch

sr=bzbarsky
Attachment #171987 - Flags: superreview+
Checked in.  Thank you for the patch, Anders!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
V/fixed, per lxr.mozilla.org.
Status: RESOLVED → VERIFIED
Keywords: helpwanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: