Closed Bug 468617 Opened 17 years ago Closed 17 years ago

OS sniffing doesn't detect OS X 10.5

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: selsky, Assigned: selsky)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Build Identifier: Mac OS X 10.5 is detected as 10.4 when the User-Agent string shows 10.5. User-Agent string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Reproducible: Always
Flags: approval?
Flags: approval?
Safari shows the following: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 Is matching on 10.5 ok, or should it be 10[\._]5, to be more specific? The existing code seems to have both lax and specific patterns.
Attachment #352105 - Flags: review? → review?(timeless)
Comment on attachment 352105 [details] [diff] [review] Detect Mac OS X 10.5 from User-Agent string Timeless is our OS detection code owner and guru so directing this review request to him.
Assignee: create-and-change → selsky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: OS sniffing doesn't detect OSX 10.5 → OS sniffing doesn't detect OS X 10.5
Comment on attachment 352105 [details] [diff] [review] Detect Mac OS X 10.5 from User-Agent string thanks
Attachment #352105 - Flags: review?(timeless) → review+
Flags: approval3.2+
Flags: approval+
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.2
Comment on attachment 352105 [details] [diff] [review] Detect Mac OS X 10.5 from User-Agent string >+ /\(.*Intel.*Mac OS X 10.5.*\)/ && do {push @os, "Mac OS X 10.5";}; 10.5 should be 10\.5, because it's a real dot.
timeless, read my previous comment.
Escape literal . in version string as mentioned by lpsolit.
Attachment #352105 - Attachment is obsolete: true
Attachment #354722 - Flags: review?
Attachment #354722 - Flags: review? → review?(timeless)
Comment on attachment 354722 [details] [diff] [review] Detect Mac OS X 10.5 from User-Agent string v2 no. lpsolit should actually read the input. Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.27.1 Those aren't dots.
Attachment #354722 - Flags: review?(timeless) → review-
Attachment #352105 - Attachment is obsolete: false
(In reply to comment #8) > lpsolit should actually read the input. I was reading the input, the one from comment 0. A single dot means "any character", not only . or _.
OK, it seems you are pretty lenient about this distinction in the existing code. Let's go with the first patch.
Attachment #354722 - Attachment is obsolete: true
tip: Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.165; previous revision: 1.164 done 3.2: Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.160.2.4; previous revision: 1.160.2.3 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 471522
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: