diff --git a/lam/templates/profedit/profilecreate.php b/lam/templates/profedit/profilecreate.php
index 25b0ddc4..53c5cf5a 100644
--- a/lam/templates/profedit/profilecreate.php
+++ b/lam/templates/profedit/profilecreate.php
@@ -193,7 +193,9 @@ if ($_GET['type'] == "user") {
echo ("
" . _("Back to Profile Editor") . "");
exit;
}
- if ($_POST['smb_smbhome'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_smbhome'])) {
+ // replace double \'s with \
+ $_POST['smb_smbhome'] = str_replace('\\\\', '\\', $_POST['smb_smbhome']);
+ if ($_POST['smb_smbhome'] && eregi("^[\][\]([a-z0-9])+([\][a-z0-9_\\-\\$%]+)+$", $_POST['smb_smbhome'])) {
$acct->smb_smbhome = $_POST['smb_smbhome'];
}
elseif ($_POST['smb_smbhome']) {
@@ -201,7 +203,9 @@ if ($_GET['type'] == "user") {
echo ("
" . _("Back to Profile Editor") . "");
exit;
}
- if ($_POST['smb_profilepath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_profilepath'])) {
+ // replace double \'s with \
+ $_POST['smb_profilepath'] = str_replace('\\\\', '\\', $_POST['smb_profilepath']);
+ if ($_POST['smb_profilepath'] && eregi("^[\][\]([a-z0-9])+([\][a-z0-9_\\-\\$%]+)+$", $_POST['smb_profilepath'])) {
$acct->smb_profilePath = $_POST['smb_profilepath'];
}
elseif ($_POST['smb_profilepath']) {
@@ -209,7 +213,9 @@ if ($_GET['type'] == "user") {
echo ("
" . _("Back to Profile Editor") . "");
exit;
}
- if ($_POST['smb_scriptPath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptPath'])) {
+ // replace double \'s with \
+ $_POST['smb_scriptPath'] = str_replace('\\\\', '\\', $_POST['smb_scriptPath']);
+ if ($_POST['smb_scriptPath'] && eregi("^[\][\]([a-z0-9])+([\][a-z0-9_\\-\\$%.]+)+$", $_POST['smb_scriptPath'])) {
$acct->smb_scriptPath = $_POST['smb_scriptPath'];
}
elseif ($_POST['smb_scriptPath']) {