正在显示
1 个修改的文件
包含
12 行增加
和
6 行删除
@@ -93,6 +93,18 @@ class Folder extends Base { | @@ -93,6 +93,18 @@ class Folder extends Base { | ||
93 | if(empty($formData['folder'])){ | 93 | if(empty($formData['folder'])){ |
94 | app()->e('folder_create_name_error'); | 94 | app()->e('folder_create_name_error'); |
95 | } | 95 | } |
96 | + | ||
97 | + $formData['folder'] = str_replace( | ||
98 | + ["'",'"','/','\\','&','*','(',')','{','}','|','$','@','!','#','%','^','<','>','?','`','~','[',']'], | ||
99 | + '', | ||
100 | + $formData['folder'] | ||
101 | + ); | ||
102 | + | ||
103 | + // 是否是系统的 | ||
104 | + if(folderAlias($formData['folder']) !== $formData['folder']){ | ||
105 | + app()->e('folder_is_exist'); | ||
106 | + } | ||
107 | + | ||
96 | // 加密后的文件夹 | 108 | // 加密后的文件夹 |
97 | $origin_folder = MailFun::folderEncoding($formData['folder']); | 109 | $origin_folder = MailFun::folderEncoding($formData['folder']); |
98 | // 不为空上级 | 110 | // 不为空上级 |
@@ -109,12 +121,6 @@ class Folder extends Base { | @@ -109,12 +121,6 @@ class Folder extends Base { | ||
109 | $origin_folder = $parent['origin_folder'].'/'.$origin_folder; | 121 | $origin_folder = $parent['origin_folder'].'/'.$origin_folder; |
110 | } | 122 | } |
111 | 123 | ||
112 | - $formData['folder'] = str_replace( | ||
113 | - ["'",'"','/','\\','&','*','(',')','{','}','|','$','@','!','#','%','^','<','>','?','`','~','[',']'], | ||
114 | - '', | ||
115 | - $formData['folder'] | ||
116 | - ); | ||
117 | - | ||
118 | // 判断文件夹是否存在 | 124 | // 判断文件夹是否存在 |
119 | $has = db()->count(folderSql::has( | 125 | $has = db()->count(folderSql::has( |
120 | [ | 126 | [ |
-
请 注册 或 登录 后发表评论