diff --git a/admin/index.php b/admin/index.php
index 74a577a..97e4a94 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -8,7 +8,6 @@ require_once APP_ROOT . '/config/config.guest.php';
// 验证登录
header("Content-Type: text/html;charset=utf-8");
-
// 退出
if (isset($_GET['login'])) {
if ($_GET['login'] = 'logout') {
diff --git a/api/index.php b/api/index.php
index 0130c68..414d4f2 100755
--- a/api/index.php
+++ b/api/index.php
@@ -54,7 +54,23 @@ $handle = new Upload($_FILES['image'], 'zh_CN');
if ($handle->uploaded) {
// 允许上传的mime类型
- $handle->allowed = array('image/*');
+ if ($config['allowed'] === 1) {
+ $handle->allowed = array('image/*');
+ }
+ // svg格式过滤
+ if ($handle->file_src_name_ext === 'svg') {
+ $svg = file_get_contents($handle->file_src_pathname);
+ if (preg_match('/';
}
- if ($status['code'] == 400) {
+ if ($status['code'] === 400) {
echo '