]> git.pld-linux.org Git - packages/dokuwiki.git/blob - dokuwiki-http_auth-option.patch
Up to 20230404a
[packages/dokuwiki.git] / dokuwiki-http_auth-option.patch
1 - https://github.com/dokuwiki/dokuwiki/pull/15
2
3 --- dokuwiki-2020-07-29a/conf/dokuwiki.php~     2022-09-03 19:58:24.000000000 +0300
4 +++ dokuwiki-2020-07-29a/conf/dokuwiki.php      2023-03-27 11:25:04.212540600 +0300
5 @@ -63,6 +63,7 @@
6  $conf['rememberme'] = 1;                 //Enable/disable remember me on login
7  $conf['disableactions'] = '';            //comma separated list of actions to disable
8  $conf['auth_security_timeout'] = 900;    //time (seconds) auth data is considered valid, set to 0 to recheck on every page view
9 +$conf['http_auth'] = 1;                  //allows HTTP authorization (SSO) from PHP_AUTH_USER/PHP_AUTH_PW variables
10  $conf['securecookie'] = 1;               //never send HTTPS cookies via HTTP
11  $conf['remote']      = 0;                //Enable/disable remote interfaces
12  $conf['remoteuser']  = '!!not set!!';    //user/groups that have access to remote interface (comma separated). leave empty to allow all users
13 --- dokuwiki-2023-04-04/inc/auth.php~   2023-04-04 19:21:21.000000000 +0300
14 +++ dokuwiki-2023-04-04/inc/auth.php    2023-04-05 15:43:33.873377532 +0300
15 @@ -75,7 +75,7 @@
16      }
17  
18      // if no credentials were given try to use HTTP auth (for SSO)
19 -    if (!$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($INPUT->server->str('PHP_AUTH_USER'))) {
20 +    if ($conf['http_auth'] && !$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($INPUT->server->str('PHP_AUTH_USER'))) {
21          $INPUT->set('u', $INPUT->server->str('PHP_AUTH_USER'));
22          $INPUT->set('p', $INPUT->server->str('PHP_AUTH_PW'));
23          $INPUT->set('http_credentials', true);
This page took 0.082032 seconds and 4 git commands to generate.