MS Exch can be set up that users have to use DOMAIN/username/mailbox
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 8 Jun 2003 16:15:02 +0000 (16:15 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 8 Jun 2003 16:15:02 +0000 (16:15 +0000)
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).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4980 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/prefs.php

index 9b35834aa3d52ac71fee3cedada912c03077b09f..10ea919a3d78f2e76454382eb9e66ca8f959dff4 100644 (file)
@@ -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. */