()
PmWiki . , . , ( ), Security. Passwords, PmWiki , . , , .
PmWiki :
read
edit
attr (, , )
,
upload
, admin .
, PmWiki :
-
adminupload; - Main PmWiki
attr( GroupAttributes); - Site, Site.SideBar, .
admin "" , .. , .
Passwords . local/config.php.
, -- admin. local/config.php:
$DefaultPasswords['admin'] = crypt('secret_password');
, "edit" local/config.php:
$DefaultPasswords['edit'] = crypt('edit_password');
$DefaultPasswords['read'], $DefaultPasswords['edit'] $DefaultPasswords['upload'] , . . , $DefaultPasswords :
$DefaultPasswords['read'] = array(crypt('alpha'), crypt('beta'));
$DefaultPasswords['edit'] = crypt('beta');
, "alpha" "beta" , "beta" - . PmWiki . - .
(/ , AuthUser)
(.. ' '), PmWiki . , , , .
, PmWiki authuser.php . AuthUser.
...
. ( ), , . , "admin" "attr" config.php. PmWiki sample-config.php , PmWiki Main "attr", - , "attr" . "attr" ( ). -- config.php:
$DefaultPasswords['admin'] = crypt('-admin-');
$DefaultPasswords['attr'] = crypt('-admin-');
config.php
crypt() config.php -- - . , config.php$DefaultPasswords['admin'] = crypt('mysecret'); "mysecret" . ,?action=cryptPmWiki ( PasswordsAdmin?action=crypt). config.php. ,?action=crypt"mysecret", PmWiki$DefaultPasswords['type']='$1$vR4.Ma1.$llNADCnbvJRxIE/hqnucA.';
?action=cryptconfig.php, :
$DefaultPasswords['admin']='$1$vR4.Ma1.$llNADCnbvJRxIE/hqnucA.'; , crypt , . , . "mysecret", - config.php . Crypt -- ( ).
, , :
$DefaultPasswords['upload'] = '';
"nopass"( $AllowPassword) ?action=attr, .
, local/config.php :
$ForbiddenPasswords = array('secret', 'tanstaafl');
if (in_array(@$_POST['authpw'], $ForbiddenPasswords))
unset($_POST['authpw']);
- "secret" "tanstaafl" , .
-
$HandleAuth(action).
()
. , ( ) ?action=source. . , , , .
:
- "source" local/config.php:
$HandleAuth['source'] ='edit'; - "source" :
$HandleAuth['source'] ='source';$DefaultPasswords['source'] = crypt(secret);#
, :
$PageAttributes['passwdsource'] = "$['Set new source password']";
<< | DocumentationIndex | AuthUser >>
PmWikiRu.PasswordsAdmin -
Backlinks
PmWikiRu.PasswordsAdmin: 2011-09-10
PmWiki.PasswordsAdmin: 2022-06-03