瀏覽代碼

match EAS and SOGO/dav case insensitive

Marcel Hofer 6 年之前
父節點
當前提交
fa80d66d6c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      data/web/sogo-auth.php

+ 2 - 2
data/web/sogo-auth.php

@@ -57,8 +57,8 @@ elseif (isset($_GET['login'])) {
 }
 }
 // do not check for admin-login / sogo-sso for EAS and DAV requests, SOGo can check auth itself if no authorization header is set
 // do not check for admin-login / sogo-sso for EAS and DAV requests, SOGo can check auth itself if no authorization header is set
 elseif (
 elseif (
-    substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 28) !== "/Microsoft-Server-ActiveSync" &&
-    substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 9) !== "/SOGo/dav"
+  strcasecmp(substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 28), "/Microsoft-Server-ActiveSync") == 0 &&
+  strcasecmp(substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 9), "/SOGo/dav") == 0
 ) {
 ) {
   // this is an nginx auth_request call, we check for existing sogo-sso session variables
   // this is an nginx auth_request call, we check for existing sogo-sso session variables
   session_start();
   session_start();