Page MenuHomePhabricator

It is not possible to add "Special:Confirmemail" to $wgWhitelistRead
Closed, ResolvedPublic

Description

Author: kelly

Description:
If you want a "secure" Wiki and use the settings described here
http://meta.wikimedia.org/wiki/Help:User_rights#Managing_group_rights
you are not able to confirm your emailaddress, because it is not possible to add
this site

http://www.domain.com/wiki/index.php/Special:Confirmemail/<CODE>

because you use only the php-command "in_array" and do not cut the code-part or
use RegExps.

Please add this feature or a variable such as
$wgGroupPermissions['*']['confirmemail']=true

Thanks in advance


Version: 1.6.x
Severity: normal
OS: Linux
Platform: Other

Details

Reference
bz6231

Event Timeline

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

mfreemon wrote:

FWIW, this is what I did as a temporary fix. I'm not sure it's the
best or most elegant solution, but it allows the email confirmation to
complete successfully.

[root@ncassr includes]# diff /root/mediawiki-
1.7.1/includes/Title.php /var/www/mediawiki-1.7.1/includes/Title.php
1153a1154,1158

if (substr_count($name,"Confirmemail") > 0) {
        return true;
}
  • Mike

Another solution comes from the site:
http://meta.wikimedia.org/wiki/Preventing_Access#Preventing_access_to_all_pages_for_non-validated_users

The problem I ran into with MediaWiki v1.7.1 is being unable to confirm my e-mail address when I create a new user. I
can access the login page and create an account, I can access my preferences to update my e-mail address, I click on
Confirm e-mail and receive the e-mail, but when I click the link, I get a "You must log in to view other pages."
message. In order to allow everyone to see the "Special:Confirmemail"
and "Special:Confirmemail/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" to verify the e-mail, you need to add four lines to
include/Title.php: find the function userCanRead() and add just before these lines, which are at the end of the
function)

}
return false;
}
the following four lines:

$names=split("/", $name);
if(strcmp($names[0],"Special:Confirmemail")==0 && count($names)==2 && preg_match('/[a-f0-9]{32}/',$names[1])) {

return true;

}
The final code should look like this:

$names=split("/", $name);
if(strcmp($names[0],"Special:Confirmemail")==0 && count($names)==2 && preg_match('/[a-f0-9]{32}/',$names[1])) {

return true;
}
  • Jack