Page MenuHomePhabricator

$wgWhitelistRead causes "syntax error on line 1" under IE6
Closed, InvalidPublic

Description

Author: cristiano.leoni

Description:
Tested on both Linux and Windows2000, ver. 1.4.9, 1.4.10, language=english, italian.
Same result:

as soon as you use the setting:

$wgWhitelistRead = array ("Main Page");

whetever you put into the above array it just generates an error when you access the
wiki's main page.
The error is obvious in IE6 (but does not occur in Firefox). A small window pops up:


Runtime Error

Line: 1

Error: Syntax Error

after saving the page on disk and opening it, the error still occurs.

An inspection of the page revealed that this error lays into a series of
uncomprehensible set of SRCed, external Javascript code.

If I can give an advice: perform auth checks on server side and drop all those
Javascript includes or make them work on IE.


Version: 1.5.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz3551

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:50 PM
bzimport set Reference to bz3551.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Those sorts of checks are done server-side; as far as I know, we only rely upon
JS for very minor things like interface tweaks per-browser. Crucial stuff like
protecting pages from viewing is done before the page gets to the browser.

You could try this, just to put my mind at ease:

$wgWhitelistRead = array("Main Page");

I'm not 100%, but I believe the space makes the difference.

shawn wrote:

(In reply to comment #2)

Include "-" in the whitelist.

What do you mean by include "-" that looks like a hyphen is that an underscore??? Do you mean "Main_Page"

I tried that below but I still get the same error...

$wgWhitelistRead=array("Main_Page","Special:Userlogin","MediaWiki:Monobook.js","MediaWiki:Monobook.css");

shawn wrote:

I am also getting this on version 1.5.3

$wgWhitelistRead=array("Main Page","Special:Userlogin","MediaWiki:Monobook.js","MediaWiki:Monobook.css");
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;

This is my permissions settings let me know if there is a way to fix this????

"-" means "-". Have you tried it?

shawn wrote:

$wgWhitelistRead=array("-","Main Page","Special:Userlogin","MediaWiki:Monobook.js","MediaWiki:Monobook.css");

Adding "-" into the array works!

  • Bug 4733 has been marked as a duplicate of this bug. ***