Sfoglia il codice sorgente

Improve the SSO login check by allowing several possible referers (BT#4158)

Yannick Warnier 12 anni fa
parent
commit
f4c1fe77ac
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      main/auth/sso/sso.class.php

+ 4 - 1
main/auth/sso/sso.class.php

@@ -27,7 +27,10 @@ class sso {
      */
     public function __construct() {
         $this->protocol   = api_get_setting('sso_authentication_protocol');
-        $this->domain     = api_get_setting('sso_authentication_domain');
+        // There can be multiple domains, so make sure to take only the first
+        // This might be later extended with a decision process
+        $domains          = split(',',api_get_setting('sso_authentication_domain'));
+        $this->domain     = trim($domains[0]);
         $this->auth_uri   = api_get_setting('sso_authentication_auth_uri');
         $this->deauth_uri = api_get_setting('sso_authentication_unauth_uri');
         //cut the string to avoid recursive URL construction in case of failure