Last modified: 2006-09-12 17:02:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6662, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4662 - Safari detection fails in wikibits.js
Safari detection fails in wikibits.js
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.6.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 4663
  Show dependency treegraph
 
Reported: 2006-01-19 01:18 UTC by Schnargel
Modified: 2006-09-12 17:02 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Schnargel 2006-01-19 01:18:33 UTC
Detection of the Safari browser in skins-1.5/common/wikibits.js is done by the line

 var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1));

At least the current Safari version returns a client string containing

 "applewebkit/417.9 (khtml, like gecko) safari/417.8"

wich fails the case sensitive comparisation with "AppleWebKit".
Comment 1 Brion Vibber 2006-01-19 02:44:45 UTC
Safari sends AppleWebKit, but wikibits.js converts the agent string to lowercase 
before doing comparisons.

Anyway, user-agent sniffing is kinda crappy; what actually uses these variables?
Comment 2 Schnargel 2006-01-19 02:50:51 UTC
It's used for bug 4663. I need to change AppleWebKit to applewebkit and change the line mentioned there to get the toolbar working
Comment 3 Brion Vibber 2006-04-17 08:28:15 UTC
Fixed in r13687 (but you should not use it; most functional 
checks should be based on behavior, not user-agent reporting.)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links