浏览代码

MS Exch can be set up that users have to use DOMAIN/username/mailbox
to log in. We need to strip these chars before creating the prefs
file, because of course a slash in the name gives problems.

It may be possible to strip out other 'illegal' chars here aswell.
Closes (#745814).

Thijs Kinkhorst 22 年之前
父节点
当前提交
e49b29a2d1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      functions/prefs.php

+ 2 - 1
functions/prefs.php

@@ -51,7 +51,8 @@ function getHashedFile($username, $dir, $datafile, $hash_search = true) {
     /* First, get and make sure the full hash directory exists. */
     $real_hash_dir = getHashedDir($username, $dir, $hash_dirs);
 
-    /* Set the value of our real data file. */
+    /* Set the value of our real data file, after we've removed unwanted characters. */
+    $datafile = str_replace('/', '_', $datafile);
     $result = "$real_hash_dir/$datafile";
 
     /* Check for this file in the real hash directory. */