Переглянути джерело

Fixed Proxy-Auth by updating checkForOrganizrOAuth function (#1771)

CauseFX 4 роки тому
батько
коміт
728d020ee2
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      api/classes/organizr.class.php

+ 2 - 2
api/classes/organizr.class.php

@@ -255,8 +255,8 @@ class Organizr
 	public function checkForOrganizrOAuth()
 	{
 		// Oauth?
-		if ($this->config['authProxyEnabled'] && $this->config['authProxyHeaderName'] !== '' && $this->config['authProxyWhitelist'] !== '') {
-			if (isset(getallheaders()[$this->config['authProxyHeaderName']])) {
+		if ($this->config['authProxyEnabled'] && ($this->config['authProxyHeaderName'] !== '' || $this->config['authProxyHeaderNameEmail'] !== '') && $this->config['authProxyWhitelist'] !== '') {
+			if (isset(getallheaders()[$this->config['authProxyHeaderName']]) || isset(getallheaders()[$this->config['authProxyHeaderNameEmail']])) {
 				$this->coookieSeconds('set', 'organizrOAuth', 'true', 20000, false);
 			}
 		}