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

Hans design5 at softflow.co.uk
Wed Dec 6 11:11:43 CST 2006


Wednesday, December 6, 2006, 5:11:31 PM, Patrick wrote:

>> ## 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!'); }

> Hmmm, this looks okay to me.  Keep in mind that if you've already
> entered the password (or the admin password) then you won't get
> a password prompt.  You might try doing ?action=logout just to make
> sure there aren't any passwords already entered.

Now I am confused:
I thought we should not try and set passwords to individual pages from
within config.php, because it is not quite safe.
But the above seems to me a way to do just that.


Hans





More information about the pmwiki-users mailing list