diff --git a/lam/lib/status.inc b/lam/lib/status.inc index dec0cdba..6a165de6 100644 --- a/lam/lib/status.inc +++ b/lam/lib/status.inc @@ -117,7 +117,7 @@ function parseMessageString($MessageString) { * the appropriate HTML tages and */ function boldText($text) { - $pattern = "/\{bold\}([^{]*)\{endbold\}/"; // Regular expression matching {bold}[Text]{endbold} + $pattern = "/\\{bold\\}([^{]*)\\{endbold\\}/"; // Regular expression matching {bold}[Text]{endbold} $replace = "\\1"; // Replace pattern return preg_replace($pattern,$replace,$text); } @@ -132,7 +132,7 @@ function boldText($text) { * @return string Input string with HTML-formatted color tags */ function colorText($text) { - $pattern = "/\{color=#?([0-9,a-f,A-F]{6})\}([^{]*)\{endcolor\}/"; // Regular expression matching {color=#[HEX-Value]}[Text]{endcolor} or {color=[HEX-Value]}[Text]{endcolor} + $pattern = "/\\{color=#?([0-9,a-f,A-F]{6})\\}([^{]*)\\{endcolor\\}/"; // Regular expression matching {color=#[HEX-Value]}[Text]{endcolor} or {color=[HEX-Value]}[Text]{endcolor} $replace = "\\2"; // Replace pattern return preg_replace($pattern,$replace,$text); } @@ -147,7 +147,7 @@ function colorText($text) { * @return string Input string with HTML-formatted link tags */ function linkText($text) { - $pattern = "/\{link=([^}]*)\}([^{]*)\{endlink\}/"; // Regular expression matching {link=[Link-Target]}[Text]{endlink} + $pattern = "/\\{link=([^}]*)\\}([^{]*)\\{endlink\\}/"; // Regular expression matching {link=[Link-Target]}[Text]{endlink} $replace = "\\2"; //Replace pattern return preg_replace($pattern,$replace,$text); } diff --git a/lam/templates/account/edit.php b/lam/templates/account/edit.php index 2c2460db..cab13b16 100644 --- a/lam/templates/account/edit.php +++ b/lam/templates/account/edit.php @@ -57,8 +57,8 @@ setlanguage(); //load account if (isset($_GET['DN'])) { - $DN = str_replace("\'", '', $_GET['DN']); - $type = str_replace("\'", '', $_GET['type']); + $DN = str_replace("\\'", '', $_GET['DN']); + $type = str_replace("\\'", '', $_GET['type']); if ($_GET['type'] == $type) $type = str_replace("'", '',$_GET['type']); if ($_GET['DN'] == $DN) $DN = str_replace("'", '',$_GET['DN']); $_SESSION['account'] = new accountContainer($type, 'account'); diff --git a/lam/templates/config/mainmanage.php b/lam/templates/config/mainmanage.php index ceb9ddc6..bad217a7 100644 --- a/lam/templates/config/mainmanage.php +++ b/lam/templates/config/mainmanage.php @@ -116,7 +116,7 @@ if ($_POST['submit']) { if ($_POST['logDestination'] == "none") $cfg->logDestination = "NONE"; elseif ($_POST['logDestination'] == "syslog") $cfg->logDestination = "SYSLOG"; else { - if (isset($_POST['logFile']) && ($_POST['logFile'] != "") && eregi("^[a-z0-9/\\\:\\._-]+$", $_POST['logFile'])) { + if (isset($_POST['logFile']) && ($_POST['logFile'] != "") && eregi("^[a-z0-9/\\\\:\\._-]+$", $_POST['logFile'])) { $cfg->logDestination = $_POST['logFile']; } else $errors[] = _("The log file is empty or contains invalid characters! Valid characters are: a-z, A-Z, 0-9, /, \\, ., :, _ and -.");