]> git.pld-linux.org Git - packages/dokuwiki.git/blob - dokuwiki-http_auth-option.patch
Fix system geshi loading
[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-2018-04-22c.org/inc/auth.php       2020-05-01 12:38:20.000000000 +0200
14 +++ dokuwiki-2018-04-22c/inc/auth.php   2022-09-27 22:46:31.557879706 +0200
15 @@ -84,7 +84,7 @@ function auth_setup() {
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($_SERVER['PHP_AUTH_USER'])) {
20 +    if($conf['http_auth'] && !$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) {
21          $INPUT->set('u', $_SERVER['PHP_AUTH_USER']);
22          $INPUT->set('p', $_SERVER['PHP_AUTH_PW']);
23          $INPUT->set('http_credentials', true);
This page took 0.033537 seconds and 3 git commands to generate.