Page MenuHomePhabricator

Syntax error message displayed in IE when anonymous on site
Closed, ResolvedPublic

Description

Author: hello

Description:
Hi,

I get a syntax error message from Internet Explorer 6 (XP SP2) on each page until I am logged as a
valid user. The wiki is configured not to allow anonymous browsing.

Error

Line: 2
Char: 1
Error: Syntax Error
Code: 0

Url: <page Url>

Top of the HTML source:

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">


Version: 1.4.x
Severity: normal
OS: Mac System 9.x
Platform: PC

Details

Reference
bz2878

Event Timeline

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

Have you ensured that the whitelist includes the style sheet and javascript pages that are used?

hello wrote:

(In reply to comment #1)

Have you ensured that the whitelist includes the style sheet and javascript pages that are used?

Not sure to understand, sorry.

I have in the LocalSettings.php file:

#Entirely disable Anonymous Edits
$wgWhitelistEdit = true;

Pages anonymous (not-logged-in) users may see

$wgWhitelistRead = array ("Main Page", "Special:Userlogin", "Wikipedia:Help");

hello wrote:

Error message in IE

Attached:

error-IE.gif (945×1 px, 107 KB)

andreas.bleul wrote:

Hi,

I have the same problem, but with IE6 running under Win2k SP4.

Andi

andreas.bleul wrote:

Sorry, I've forgot to say, that this problem not occurs, when I'm using Opera

andreas.bleul wrote:

I think, the problem lies in User.php::isAllowed.

This line within the definition of the array $groupRights causes the problem:

'read' => empty( $wgWhitelistRead ) ? '*' : 'user',

This means, that, when an user is not logged in and no $wgWhitelistRead exists,
the right will be set to * and everthing is fine.

But when the List is not empty, the right is set to 'user'. So, only logged in
users can see the page; in this case the login page...

Just change the line to:

'read' => '*'

The Whitelist will be evaluated in Title.php::userCanRead()