Extension talk:Lockdown

From MediaWiki.org
Jump to: navigation, search
Start a new discussion

Contents

Thread titleRepliesLast modified
block edit access to user page - except for admins?023:55, 5 April 2013
Making lockdown function022:44, 22 March 2013
Update Credits (for Special:Version)021:58, 16 March 2013
Works with 1.19.1015:14, 25 January 2013
Lockdown preventing users resetting their password017:15, 29 November 2012
Problem with mw 1.17311:10, 30 August 2012
Locking down special pages203:45, 23 July 2012
whitelisted pages still need login when anonymous users read is set to false:119:25, 11 July 2012
No download link108:49, 9 July 2012
Locdown on Special pages as a NS?007:48, 15 February 2012
Problems with MediaWiki 1.16.5413:52, 31 January 2012
Subscribe to RSS (Atom) feed003:08, 19 December 2011
Lockdown not showing user groups621:29, 7 December 2011
Lockdown and problems with common wiki handling212:14, 26 November 2011
why can't i get a non-trunk version for my mediawiki 1.17?019:37, 7 November 2011
Security Flaw309:17, 8 September 2011
possible conflict with ConfirmAccount extension?015:56, 11 August 2011
permission error on Special:UserRights306:48, 23 August 2011
Extension doesn't work with 1.16.0415:35, 10 August 2011
Cannot edit protected pages with Bot in LockDown wiki315:50, 8 August 2011
First page
First page
Previous page
Previous page
Last page
Last page

block edit access to user page - except for admins?

block edit access to user page - except for admins?

$wgNamespacePermissionLockdown[user]['edit'] = array('syop');

Is this the correct coding? Using Mediawiki 1.16

It is not working.

Thank you

Igottheconch (talk)23:55, 5 April 2013

Making lockdown function

I have lockdown working fine using this:

$wgExtraNamespaces[100] = "Hide";
$wgExtraNamespaces[101] = "Hide_Talk";
$wgGroupPermissions['Hide'] = $wgGroupPermissions['user'];
$wgNamespacePermissionLockdown[100]['*'] = array('Hide');
$wgNamespacePermissionLockdown[101]['*'] = array('Hide');

I have to lockdown a BUNCH of namespaces and there are many admins on the site. So, I had the idea to write this function:

function make_lockdown_space($id, $name)
{
    global $wgExtraNamespaces, $wgGroupPermissions, $wgNamespacePermissionLockdown;
    $wgExtraNamespaces[$id] = $name;
    $wgExtraNamespaces[$id+1] = $name."_Talk";
    $wgGroupPermissions[$name] = $wgGroupPermissions['user'];
    $wgNamespacePermissionLockdown[$id]['*'] = array($name);
    $wgNamespacePermissionLockdown[$id+1]['*'] = array($name);
}

With this function, I theoretically only need:

make_lockdown_space(100, "Hide");

With that function, I check all the arrays. All are set. All look good. However, there is no lockdown. Anyone can see the namespaces that are supposedly locked down. Why? I don't see how it is possible that the arrays are altered without a problem, but lockdown fails. Anyone know what is happening?

71.204.230.6622:44, 22 March 2013

Update Credits (for Special:Version)

This is picky and definitely not a priority, but it would be nice to be consistent with other extensions (plus, version ID's would be helpful for dependent developers such as myself).

For consistency, credits could be updated:

$wgExtensionCredits['other'][] = array(
        'path' => __FILE__,
        'name' => 'Lockdown',
        'author' => array( 'Daniel Kinzler', 'Platonides'),
        'url' => 'http://mediawiki.org/wiki/Extension:Lockdown',
        'version'  => "1.0",
        'descriptionmsg' => 'lockdown-desc',
);
jdpond (talk)21:58, 16 March 2013

Works with 1.19.1

Hi all, thought I might just provide a small update. I've tested and implemented the following version details successfully:

MediaWiki 1.19.1 Lockdown-db7023e

Quantos (talk)15:13, 25 January 2013

Lockdown preventing users resetting their password

Hi.

If I have lockdown enabled then users are unable to reset their password or change their password if they have forgotten. They go through the process, but on the final step it says they do not have permission. If have the following defined:

$wgSpecialPageLockdown['ChangePassword'] = array('*');
$wgSpecialPageLockdown['PasswordReset'] = array('user');

But it still does not work. If I disable lockdown then password changes and resets work fine. What required permission am I missing?

Any ideas?

Thanks!

Mitchelln (talk)17:14, 29 November 2012

Problem with mw 1.17

I have used Lockdown with mw 1.15 and 1.16 with no problems. I upgraded a 1.15 to 1.17 with the correct extension version. Editing is configured to logged in users. Logged in as sysop I could not edit at all. Removing lockdown and leaving all other extensions all was fine. I set up a clean mw 1.17. Just added require Lockdown extension and sysop has no ability to see extra special pages. This is similar to comments below. Adding the patch below allows sysop to see the extra pages - 'User rights management'. However until the line $wgSpecialPageLockdown['Userrights'] = array('sysop', 'bureaucrat'); is added it is still impossible to use that page and set rights it says you do not have the right. Following that it now seems to work as expected. New namespaces can be locked to sysop and project can be locked to sysop.

There really does seem to be a fundamental problem with this extension and mw 1.17. This is a lot to work out for a simple install. Some indication should go in the main Lockdown extension page and hopefully an updated download for mw 1.17 produced.

86.163.48.22212:08, 26 August 2011

The problem seems quite simple:

  • MediaWiki starts loading the logged in user
  • While loading it tries to get a list of searchable namespaces and calls the SearchableNamespaces-hook
  • Lockdown kicks in and tries to calculate the searchable namespaces, but needs the groups for that
  • Lockdown asks the user-object for the groups
  • The user-object hasn't finished loading and hasn't loaded the groups yet, so it will only give '*' as the users' groups and caches that.
  • Next time Lockdown - or anything at all! - asks for the groups it will get the cached version: '*'

Changing getEffectiveGroups() to getEffectiveGroups(true) tells MediaWiki to ignore the cache (and even repopulate it) and it will be fixed. However, the first time Lockdown asked for the groups it got a wrong answer so that could cause problems.

The solution is a unfortunately a lot less simple. I think the best way will be to let MediaWiki detect it hasn't loaded the groups yet and do that direct. (Or just change the order so the groups will be loaded before even thinking about searchable namespaces.)

Hope this helps.

Quis23:11, 3 September 2011

Here is what I am getting in my upgrade from Mediawiki 1.16 to 1.17.

Fatal error: Call to undefined method MediaWiki::getAction() in... ...extensions/Lockdown/Lockdown.php on line 130

Which throws back a 500 error. Any suggestions as I really need to upgrade another wiki using the Lockdown extension, but will not upgrade until I am sure Lockdown is working properly. Thanks Hutchy68 17:34, 24 January 2012 (UTC)

Edit--- Yes I am using version for 1.18
Hutchy6817:34, 24 January 2012

I've the same issue. Have changed some php but locking of special pages also does not work...

213.197.11.10211:10, 30 August 2012
 
 
 

Locking down special pages

I was having problem with locking down certain special pages based on user groups with Lockdown on MW 1.17 and 1.16. Here is a solution that doesn't need Lockdown at all, just enter this in your LocalSettings.php:

function SpecialPageBlock(&$list){
global $wgUser;
if (in_array('sysop', $wgUser->getGroups()) == 0){
foreach(array('Uncategorizedimages','Unusedimages','Withoutinterwiki', 'Newimages','Listfiles','MIMEsearch','FileDuplicateSearch','Filepath', 'Booksources','Mostimages','Tags','Disambiguations','BrokenRedirects','Deadendpages', 'DoubleRedirects','Longpages','Ancientpages','Lonelypages','Fewestrevisions','Protectedpages', 'Protectedtitles','Shortpages','Uncategorizedcategories','Uncategorizedpages','Uncategorizedtemplates', 'Unusedcategories','Unusedtemplates','Wantedcategories','Wantedfiles','Wantedpages','Wantedtemplates', 'Allpages','Prefixindex','Categories','Listredirects','Activeusers','Contributions', 'Log','Newpages','Recentchanges','Recentchangeslinked','Listgrouprights','Listusers', 'Popularpages','Statistics','Allmessages','Version','LinkSearch','Random','Randomredirect', 'Mostlinkedcategories','Mostlinkedpages','Mostlinkedtemplates','Mostcategories','Mostrevisions', 'Export','Whatlinkshere'
)as $i){unset($list[$i]);}}
return true;}
$wgHooks['SpecialPage_initList'][]='SpecialPageBlock';

The example above limits access to the pages listed in the array to the 'sysop' group, by removing the pages from the rest of the groups. The best thing in this solution is that the pages in the array won't even show up on the SpecialPages.

For some reason Random and MostLinkedPages couldn't be disabled this way, any ideas why?

TheRebel10:30, 20 November 2011

Thanks! A much better solution. People don't even know what they're missing.

203.118.164.21900:16, 25 November 2011
 

This works perfectly. This should be linked to from restricting access pages. Thanks a bunch.

50.137.193.14903:45, 23 July 2012
 

whitelisted pages still need login when anonymous users read is set to false:

Hi.

This is my LocalSettings.php http://pastebin.com/Q39JFZX1

All pages listen in $wgWhitelistRead except Main_page and Hovedside(Main_page in norwegian) are then viewed. But the Main_page still needs logging in.

Im really not sure if I fucked something up, or if something is just broken.

The main_page contains links to all the other pages that can be viewed anonymously. So it's kinda vital that one can view it without logging inn. The other pages and the main page itself contains information on how to get access to the wiki, etc.. Also. Not everyone in the organization will/can have edit access to the wiki, but they will need the anonymous read access.

JadeSoturi17:31, 26 October 2011

I was just having this problem. I found out the issue was an underscore. Mediawiki is forgiving between "Main Page" and "Main_Page", but the script requires it be identical so you need to use "Main Page" and not "Main_Page".

128.61.16.24919:25, 11 July 2012
 

No download link

The download link is dead.

For me the links to the SVN server work correct.

Rrosenfeld (talk)08:49, 9 July 2012
 

Locdown on Special pages as a NS?

Hi I had a huge problem with nameSpaces and thus I an a bit reluctant to experiment. However what I want to do is a general lockdown on all special pages, less those to make a user login, and naturally a special namespace (say NS_Background). (Running 1.8.1)

Perhaps some of you have a suggestion or solution for me to do this?

I tried to lockdown everything, but the Background pages, like below. But I the anonymous user can't read the 'Background:' pages like this... so what did I miss?

$wgGroupPermissions['*' ]['edit']      = false;     
$wgGroupPermissions['*' ]['read']      = false;  
$wgNamespacePermissionLockdown[NS_Background]['read'] = array('*');
$wgNamespacePermissionLockdown[NS_Background]['edit'] = array('sysop');

What I really wanted to do is something like adding this, to the above:

$wgNamespacePermissionLockdown[NS_SPECIAL]['read'] = array('sysop'); ## Actually this may work??
$wgWhitelistRead = array ( < the special pages for search etc. > ); 

Alternately I would wish for at way to do something like this:

$wgWhitelistRead = array ("Background:", "Special:Search")  /  array ("Background:*", .....) 
$wgWhitelistEdit = array ("Discussion")  ## Giving permission to discus any readable page. 

So I guess I could use some kind of "function call" to build that area something like:

$myWhiteListedNameSpaces = getAllNameSpacesAsAnArray("NS_Background") ## or say getAllCategoryPagesAsAnArray("Background") 
$wgWhitelistRead = array ("Getting started", $myWhiteListedNameSpaces )
Asset07:48, 15 February 2012

Problems with MediaWiki 1.16.5

I've installed a new MediaWiki sing 1.16.5, where anonymous users do not have the right to edit pages. When I enabled the Lockdown extension, without any further Lockdown config, the edit tab is removed for all logged in users.

Tracing the code the lockdownUserCan() is only called for the read action for logged in users and no further and then lockdownSearchableNamespaces() is called twice when loading a page. Disabling the lockdownSearchableNamespaces() hook makes the problem go away so I investigated further down this way. It turns out that changing

$ugroups = $wgUser->getEffectiveGroups();

inside lockdownSearchableNamespaces to

$ugroups = $wgUser->getEffectiveGroups(true);

fixes this (this disables the cache for getEffectiveGroups()).

With this change my MediaWiki installation works and now lockdownUserCan() is called in addition for edit and move actions when loading a page (after the two calls to lockdownSearchableNamespaces()).

I'm very new to MediaWiki, let alone the MediaWiki APIs, so I'm not sure if this is the correct fix or not or what is actually going on.

For reference the relevant permission related parts of LocalSettings.php are:

$wgGroupPermissions['*']['createaccount']    = false;
$wgGroupPermissions['*']['edit']             = false;
$wgGroupPermissions['*']['createpage']       = false; # 'createpage' requires the 'edit' right
$wgGroupPermissions['*']['createtalk']       = false; # 'createtalk' requires the 'edit' right
$wgGroupPermissions['*']['writeapi']         = false;

# despite documented defaults administrators do not have 'suppressredirect' by default
$wgGroupPermissions['sysop']['suppressredirect'] = true;

require_once( "$IP/extensions/Lockdown/Lockdown.php" );
212.147.27.179 14:01, 12 May 2011 (UTC)04:55, 6 June 2011

This has already been fixed if you download the latest snapshot (the "trunk" version) of Lockdown.

--Skizzerz 23:19, 12 May 2011 (UTC)04:55, 6 June 2011

Nice! Great to see it fixed in a proper way ;-) Any chance the fix is propagated to the MW-1.16 snapshot?

--212.147.27.179 09:49, 13 May 2011 (UTC)04:55, 6 June 2011
 

Hi. Be careful here: if you install the "trunk" version of Lockdown you will need the "trunk" version of MediaWiki too!

I just tried it an got this error:

"Call to undefined method MediaWiki::getAction()"

Better to only correct these getEffectiveGroups() and wait next release of Lockdown, I think.

180.183.208.15509:51, 14 June 2011

Since no one replied to my posting about 1.17 issues above, I decided to just try upgrading from 16.0 to 16.5 for the security fixes...this is the result.

Warning: Cannot modify header information - headers already sent by (output started
at ..../w/extensions/Lockdown/Lockdown.php:1) in ..../w/includes/WebResponse.php on line 16o

Is this extension being overseen any more? Thanks Hutchy68 13:52, 31 January 2012 (UTC)

Hutchy6813:52, 31 January 2012
 
 
 

Subscribe to RSS (Atom) feed

Is it possible to have a locked-down wiki that still allows me (as an administrator) to subscribe to the Recent Changes feed, to monitor updates? If so, how do I set this up?

Dvd314103:08, 19 December 2011

Lockdown not showing user groups

I have some strange behavior with lockdown (1.16-r70092) using MW 1.16.5. When I write 'require_once("$IP/extensions/Lockdown/Lockdown.php");' to my LocalSettings.php the Special:Preferences page won't show my user groups anymore (even though they are displayed in the groups List (Special:ListUsers&group=bureaucrat)). I would not mind that, but it also deletes my userrights-permission (i.e. no access to Special:UserRights), so I can't setup the Lockdown Extension properly. Is there any way to work around that?

--141.20.192.102 12:02, 3 June 2011 (UTC)04:56, 6 June 2011

Hi, I also had that problem and I solved it by following the same instructions as below.

I simply changed all getEffectiveGroups() to getEffectiveGroups(true).

Hope this helps,

Toniher 14:53, 9 June 2011 (UTC)14:53, 9 June 2011

It does :) Thank you!

141.20.192.6610:47, 10 June 2011
 

The complete patch to apply to the version of Lockdown from 1_17_0 svn-tree:

--- svn-extensions/Lockdown/Lockdown.php        2011-06-27 19:53:38.000000000 +0000
+++ man-extensions/Lockdown-patched/Lockdown.php        2011-06-27 20:26:20.000000000 +0000
@@ -96,7 +96,7 @@
        # print "<br />nsAccessUserCan(".$title->getPrefixedDBkey().", ".$user->getName().", $action)<br />\n";
        # print_r($groups);
 
-       $ugroups = $user->getEffectiveGroups();
+       $ugroups = $user->getEffectiveGroups(true);
        # print_r($ugroups);
 
        $match = array_intersect( $ugroups, $groups );
@@ -127,7 +127,7 @@
        if ( $groups === null ) return true;
        if ( count( $groups ) == 0 ) return false;
 
-       $ugroups = $user->getEffectiveGroups();
+       $ugroups = $user->getEffectiveGroups(true);
        $match = array_intersect( $ugroups, $groups );
 
        if ( $match ) return true;
@@ -136,7 +136,7 @@
 
 function lockdownSearchableNamespaces($arr) {
        global $wgUser, $wgNamespacePermissionLockdown;
-       $ugroups = $wgUser->getEffectiveGroups();
+       $ugroups = $wgUser->getEffectiveGroups(true);
 
        foreach ( $arr as $ns => $name ) {
                $groups = @$wgNamespacePermissionLockdown[$ns]['read'];
@@ -155,7 +155,7 @@
 function lockdownTitle(&$title) {
        if ( is_object($title) ) {
                global $wgUser, $wgNamespacePermissionLockdown;
-               $ugroups = $wgUser->getEffectiveGroups();
+               $ugroups = $wgUser->getEffectiveGroups(true);
 
                $groups = @$wgNamespacePermissionLockdown[$title->getNamespace()]['read'];
                if ( $groups === NULL ) $groups = @$wgNamespacePermissionLockdown['*']['read'];
@@ -184,7 +184,7 @@
                return true;
        }
 
-       $ugroups = $wgUser->getEffectiveGroups();
+       $ugroups = $wgUser->getEffectiveGroups(true);
 
        foreach ( $searchEngine->namespaces as $key => $ns ) {
                $groups = @$wgNamespacePermissionLockdown[$ns]['read'];
91.61.104.24120:47, 27 June 2011

This patch was added with r94275 Cheers

[[kgh]]21:29, 7 December 2011
 
 

Works on 1.17 as well, thanks for your effort

194.213.2.4015:02, 12 July 2011

It only works correctly with 1.17 in the case you have run the update.php after having replaced the corrected lockdown.php.

Feechen21:41, 5 August 2011
 
 

Lockdown and problems with common wiki handling

Hi,

when using Lockdown to keep an Namespace being hidden to normal users, we have the following problems:

User rights cannot be accessed, the listed patches on this side works very well for this!

BUT, pages cannot be deleted...wiki returns I don't have the rights, either if i'm sysop or bureaucrat

Additions to LocalSettings.php:

define("NS_ARKAN", 100);
$wgExtraNamespaces[NS_ARKAN] = "Arkan";
$wgGroupPermissions['arkanology']['Arkan_*'] = true;

require_once( "$IP/extensions/Lockdown/Lockdown.php" );

$wgSpecialPageLockdown['Userrights'] = array('sysop', 'bureaucrat');
$wgNamespacePermissionLockdown[NS_ARKAN]['*'] = array('arkanology');

Sebastian

217.246.34.15312:59, 14 November 2011

I have the same problem. I wnat only sysop to delete. I got round it with $wgGroupPermissions['*']['delete'] = true; $wgNamespacePermissionLockdown[NS_MAIN]['delete'] = array( 'sysop' ); Theory being set everyone to delete and then restrict the main namespace back to sysop. You may need to work through the namespaces if you want them restricted. To just bring back delete the first statement may be enough.

86.186.106.14112:14, 26 November 2011
 

I have the same problem. I wnat only sysop to delete. I got round it with $wgGroupPermissions['*']['delete'] = true; $wgNamespacePermissionLockdown[NS_MAIN]['delete'] = array( 'sysop' ); Theory being set everyone to delete and then restrict the main namespace back to sysop. You may need to work through the namespaces if you want them restricted. To just bring back delete the first statement may be enough.

86.186.106.14112:14, 26 November 2011
 

why can't i get a non-trunk version for my mediawiki 1.17?

i have a mediawiki version 1.17 running but am unable to get a working version from the site. it say's unable to locate the svn-repository. help?

188.62.170.20619:35, 7 November 2011

Security Flaw

If a user creates a redirect to a protected page while using the Vector skin, the user can access that page regardless of whether they have read access or not.

Ecliptica 21:32, 6 April 2011 (UTC)04:54, 6 June 2011

This also applies to inclusion {{:Page}} of redirects #REDIRECT:[[Protected:Page]].

TiCPU 13:30, 3 August 2011 (UTC)13:30, 3 August 2011

For myself I fixed it using:

diff -udpr includes//parser/Parser.php /root/mediawiki/mediawiki-1.16.4/includes/parser/Parser.php
--- includes//parser/Parser.php 2011-08-03 09:43:32.000000000 -0400
+++ /root/mediawiki/mediawiki-1.16.4/includes/parser/Parser.php 2010-05-11 22:12:12.000000000 -0400
@@ -3154,7 +3154,7 @@ class Parser
                $deps = array();
 
                // Loop to fetch the article, with up to 1 redirect
-               for ( $i = 0; $i < 1 && is_object( $title ); $i++ ) {
+               for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {
                        # Give extensions a chance to select the revision instead
                        $id = false; // Assume current
                        wfRunHooks( 'BeforeParserFetchTemplateAndtitle', array( $parser, &$title, &$skip, &$id ) );

Almost the same as removing the loop, Mediawiki won't fetch redirect in inclusion now.

TiCPU13:49, 3 August 2011

My configuration is MW 1.17 with LdapAuthentication 1.2d.

I have restricted access to a page by moving it in a NS_protected namespace.

My lockdown configuration is : $wgNamespacePermissionLockdown[NS_protected]['read'] = array('mygroup');

This work fine but not with page inclusion {{:NS_protected:Page}} or redirection #REDIRECT:[[NS_protected:Page]].

I have tried to patch Parser.php like TiCPU but still have the problem.

Klausla09:17, 8 September 2011
 
 
 

possible conflict with ConfirmAccount extension?

Hi again, i using MediaWiki 1.17.0 and have installed both Lockdown and ConfirmAccount extensions. Without ConfirmAccount included in LocalSettings.php, Lockdown works excellent, and vice versa. But if included along, they does a common error, when registered user groups ('user', 'sysop' etc.) have rights as ' * ' group, not more. I have changed getEffectiveGroups() to getEffectiveGroups(true), like it was recommended below, but it didn't help. Can you please help me?

94.41.25.5115:56, 11 August 2011

permission error on Special:UserRights

Hello and exuse my english. Just installed Lockdown on MediaWiki 1.17.0. When entering as a bureaucrat who has 'userrights' privilege by default, there is a permission error on Special:UserRights, which claims i don't have such right to manage user rights. What could be the problem? Begging your pardon again. 81.30.184.63 17:56, 10 August 2011 (UTC)

81.30.184.6317:56, 10 August 2011

Hi, I got the same problem myself. Try to apply getEffectiveGroups(true) patch you can see in another thread below. Otherwise, try to add this line:

$wgSpecialPageLockdown['Userrights'] = array('sysop', 'bureaucrat');

Hope this helps!

Toniher10:43, 11 August 2011

After adding the line you advised, it works well. Thank you very much.

94.41.25.5111:45, 11 August 2011

I had the same issue; adding the $wgSpecialPageLockdown line to LocalSettings.php, together with the getEffectiveGroups() hack described below, also fixed it for me.

Dvd314106:48, 23 August 2011
 
 
 

Extension doesn't work with 1.16.0

The extension doesn't work! If i enable Lockdown, I'm able to edit group membership of every user, while not logged in! I can see every special page, also those, usually only visible to sysops! I'm not using any Lockdown-feature. I only enable it in Localsettings with the line require_once("$IP/extensions/Lockdown/Lockdown.php") and all permissions defined anywhere are deactivated. If Lockdown is enabled, lines like $wgGroupPermissions['*']['edit'] = false; are completely ignored, no matter if the line is placed before or after the Lockdown-line.
Is this normal behaviour? I'm using MediaWiki 1.16.0. The lines in my LocalSettings.php are:

# Lockdown
require_once( "$IP/extensions/Lockdown/Lockdown.php" );
# Force login to edit
$wgGroupPermissions['*']['edit'] = false;

You don't have to use the extension, it's to enough to simply enable it!
Any idea?

--82.135.46.2 10:46, 12 January 2011 (UTC)04:50, 6 June 2011

Update:
Now the extension works after doing this:

  1. Create a restricted namespace
  2. Create an article in that namespace with a user who has permission to do that
  3. Log-out (until now, nothing had changed; I'm still able to access sysop special pages and change user rights as an anonymous)
  4. Search for the article, created in step two
  5. Click on the result (there shouldn't be a result!)
  6. Now you get a restriction failure
  7. From now on, the extension works as expected

The buggy behaviour, described above appeared today's morning out of nowhere. I used the extension for several weeks and saw it today for the first time. Any idea about that?

--82.135.46.2 11:57, 12 January 2011 (UTC)04:50, 6 June 2011
 

Update:
Now I have figured out the problem: It's something with the cookies. You can reproduce it in the following way:

  1. Log in to your wiki as an admin
  2. Close your browser
  3. Open your browser
  4. Check your cookies: there are two left: wikinameUserID and wikinameUserName
  5. Navigate to your wiki
  6. Go to Special Pages
  7. Here you can see all pages, you could see as an admin, even though you're not logged in!
  8. Deactivate the Lockdown Extension at LocalSettings.php
  9. Reload Special Pages
  10. Now, everything's OK; you're treated as an anonymous, without any rights
  11. Reactivate the Lockdown Extension at LocalSettings.php
  12. Reload Special Pages
  13. Now you're treated as an admin
  14. Delete one of that cookies mentioned above, it doesn't matter which one
  15. Now you're treated as an anonymous

You see: The Lockdown-Extension is the problem.

--82.135.46.2 09:55, 14 January 2011 (UTC)04:51, 6 June 2011

There was a full thread on this showing how to reproduce exactly the same issue you're seeing but by deleting the PHP session on the server itself... apparently it wasn't migrated over when the discussion was switched from a one-page flat format.

I tried to work extensively to get it brought to someone's attention. Admins here seem more interested in telling users they're wrong and don't know how to use the extension rather than investigating the issue and trying to figure out where it's coming from for some people.

RandomUser4215:29, 10 August 2011

Here's the post from the previous discussion copied over -

Reproduce buggy behavior Log into the wiki and leave the browser open and wait for your session to expire. (I've read this may be influenced by session.gc_maxlifetime and session.cache_expire in php.ini, but this doesn't seem to be the case for me.) After it expires, you should be able to edit the pages without being logged in.

Update: Here's a much quicker way to make your php session end, and to be able to see the bug. Find where your php sessions are being stored (this is session.save_path in phpinfo(), default /var/lib/php5/ on Ubuntu). Grep the files for your logged in username. Delete the session file for your session. Apache/PHP will recreate it as soon as you navigate to another page on your wiki - however, you should now be logged out AND able to edit pages without logging in. I'm beginning to wonder if this is more of a Mediawiki bug than a bug with this extension

15:35, 10 August 2011
 
 
 

Cannot edit protected pages with Bot in LockDown wiki

Hello,

I have noticed that I cannot edit pages with Perl MediaWiki::Bot bots if they are protected ('protect' or 'autoconfirmed' protections). No problem when done using the same bot logged in as user from the browser. The error I get in the script: Error code 3: protectedpage: The ``autoconfirmed right is required to edit this page at myscript.pl line 189. Any idea?

Toniher20:18, 10 July 2011

Apologies, it's also failing with Lockdown disabled. So it must be another thing.

Toniher10:54, 11 July 2011

No, it still fails. Apart from the previous error, it does not get the bot flag: Mybot doesn't have a bot flag; edits will be visible in RecentChanges at /usr/local/share/perl/5.10.1/MediaWiki/Bot.pm line 1928.. No problem when logged from the browser, though. I'll continue researching.

Toniher07:03, 12 July 2011

The problem I comment is with hook SearchableNamespaces, once only this is disabled, bot is loaded with proper permissions. I suspect it must be MediaWiki bug therefore. I filled a bug. Unless you host private content, you can comment line: $wgHooks['SearchableNamespaces'][] = 'lockdownSearchableNamespaces'; to bring robots back to work.

Toniher15:50, 8 August 2011
 
 
 
First page
First page
Previous page
Previous page
Last page
Last page