diff options
| -rw-r--r-- | .docker/nginx/nginx.conf | 1 | ||||
| -rw-r--r-- | CONTRIBUTORS.md | 1 | ||||
| -rw-r--r-- | app/Controller/Auth.php | 9 | ||||
| -rw-r--r-- | app/Template/header.php | 12 | ||||
| -rw-r--r-- | app/constants.php | 3 | ||||
| -rw-r--r-- | config.default.php | 3 | ||||
| -rw-r--r-- | doc/config.markdown | 3 |
7 files changed, 25 insertions, 7 deletions
diff --git a/.docker/nginx/nginx.conf b/.docker/nginx/nginx.conf index a09e8e12..88c532fe 100644 --- a/.docker/nginx/nginx.conf +++ b/.docker/nginx/nginx.conf @@ -53,6 +53,7 @@ http { etag on; } + client_max_body_size 32M; gzip on; gzip_comp_level 3; gzip_disable "msie6"; diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 118a837d..7cd2f446 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -28,6 +28,7 @@ Contributors: - [Daniel Raknes](https://github.com/danielraknes) - [David-Norris](https://github.com/David-Norris) - [Dmitry](https://github.com/dmkcv) +- [Djpadz](https://github.com/djpadz) - [Draza (bdpsoft)](https://github.com/bdpsoft) - [Eskiso](https://github.com/eSkiSo) - [Esteban Monge](https://github.com/EstebanMonge) diff --git a/app/Controller/Auth.php b/app/Controller/Auth.php index fef7f0e3..b98dff5d 100644 --- a/app/Controller/Auth.php +++ b/app/Controller/Auth.php @@ -55,8 +55,13 @@ class Auth extends Base */ public function logout() { - $this->sessionManager->close(); - $this->response->redirect($this->helper->url->to('auth', 'login')); + if (! DISABLE_LOGOUT) { + $this->sessionManager->close(); + $this->response->redirect($this->helper->url->to('auth', 'login')); + } + else { + $this->response->redirect($this->helper->url->to('auth', 'index')); + } } /** diff --git a/app/Template/header.php b/app/Template/header.php index fd9ff24d..72d89b80 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -84,13 +84,15 @@ <i class="fa fa-life-ring fa-fw"></i> <?= $this->url->link(t('Documentation'), 'doc', 'show') ?> </li> - <li> - <i class="fa fa-sign-out fa-fw"></i> - <?= $this->url->link(t('Logout'), 'auth', 'logout') ?> - </li> + <?php if (! DISABLE_LOGOUT): ?> + <li> + <i class="fa fa-sign-out fa-fw"></i> + <?= $this->url->link(t('Logout'), 'auth', 'logout') ?> + </li> + <?php endif ?> </ul> </div> </li> </ul> </nav> -</header>
\ No newline at end of file +</header> diff --git a/app/constants.php b/app/constants.php index 1740494e..011fa784 100644 --- a/app/constants.php +++ b/app/constants.php @@ -97,6 +97,9 @@ defined('ENABLE_URL_REWRITE') or define('ENABLE_URL_REWRITE', isset($_SERVER['HT // Hide login form defined('HIDE_LOGIN_FORM') or define('HIDE_LOGIN_FORM', false); +// Disabling logout (for external SSO authentication) +defined('DISABLE_LOGOUT') or define('DISABLE_LOGOUT', false); + // Bruteforce protection defined('BRUTEFORCE_CAPTCHA') or define('BRUTEFORCE_CAPTCHA', 3); defined('BRUTEFORCE_LOCKDOWN') or define('BRUTEFORCE_LOCKDOWN', 6); diff --git a/config.default.php b/config.default.php index cc92daa3..52c0c143 100644 --- a/config.default.php +++ b/config.default.php @@ -166,6 +166,9 @@ define('ENABLE_URL_REWRITE', false); // Hide login form, useful if all your users use Google/Github/ReverseProxy authentication define('HIDE_LOGIN_FORM', false); +// Disabling logout (for external SSO authentication) +define('DISABLE_LOGOUT', false); + // Enable captcha after 3 authentication failure define('BRUTEFORCE_CAPTCHA', 3); diff --git a/doc/config.markdown b/doc/config.markdown index 92ff2217..150cb6dc 100644 --- a/doc/config.markdown +++ b/doc/config.markdown @@ -267,6 +267,9 @@ define('API_AUTHENTICATION_HEADER', ''); // Hide login form, useful if all your users use Google/Github/ReverseProxy authentication define('HIDE_LOGIN_FORM', false); +// Disabling logout (for external SSO authentication) +define('DISABLE_LOGOUT', false); + // Override API token stored in the database, useful for automated tests define('API_AUTHENTICATION_TOKEN', 'My unique API Token'); ``` |
