This commit has been accessed 667 times via Git panel.
commit 4fe03ece161296e372462c13b324d5242d2089a0
tree 02f97e1f405deced211348a9db84e9433917286d
parent 2cfcb3688ef2b1e5d39cc2ac1fb14d374edb0847
author Engels Antonio <engels@majcms.org> 1340479812 +0800
committer Engels Antonio <engels@majcms.org> 1340479812 +0800
Fix display of inline images with @ in filename
diff --git a/read.php b/read.php
index b821546..90c9e9f 100644
--- a/read.php
+++ b/read.php
@@ -383,7 +383,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
$fileName = str_replace(" ", "_", $fileName);
- $fileName = preg_replace("/[^a-zA-Z0-9.\-_]/u", "", $fileName);
+ $fileName = preg_replace("/[^a-zA-Z0-9.\-_@]/u", "", $fileName);
if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
file_put_contents("$filePath/$fileName",$fileContent);
tree 02f97e1f405deced211348a9db84e9433917286d
parent 2cfcb3688ef2b1e5d39cc2ac1fb14d374edb0847
author Engels Antonio <engels@majcms.org> 1340479812 +0800
committer Engels Antonio <engels@majcms.org> 1340479812 +0800
Fix display of inline images with @ in filename
diff --git a/read.php b/read.php
index b821546..90c9e9f 100644
--- a/read.php
+++ b/read.php
@@ -383,7 +383,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
$fileName = str_replace(" ", "_", $fileName);
- $fileName = preg_replace("/[^a-zA-Z0-9.\-_]/u", "", $fileName);
+ $fileName = preg_replace("/[^a-zA-Z0-9.\-_@]/u", "", $fileName);
if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
file_put_contents("$filePath/$fileName",$fileContent);