[pmwiki-devel] Require a password to edit RecentChanges (etc.) pages: regex problem

Hans design5 at softflow.co.uk
Tue Dec 5 04:00:39 CST 2006

Tuesday, December 5, 2006, 7:02:39 AM, Simon wrote:

> I've added the following to my config.php,
> but I don't get the prompt for a password.
> I suspect my regex is wrong, can anyone help please

> ## Require a password to edit RecentChanges (etc.) pages.
> if ($action=='edit'
>     &&
> preg_match('/\\.(Search|(Main|Side)Bar|Group(Header|Footer|Attributes)|(All)?RecentChanges)$/',
> $pagename))
>   { $DefaultPasswords['edit'] = crypt('mysecretpassword!'); }

AFAIK there is no way you can set a password to individual pages from
within a local customisation file, because password attributes reside
in the page, or in the GroupAttributes page for group wide passwords.
Any attempts to do so will still leave security holes, because the
page can still be accessed in other ways.


More information about the pmwiki-devel mailing list