diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/conf/global.json b/openresty/1.27.1.1-1-focal/1pwaf/data/conf/global.json index 9e0549ce6..c929eb6dd 100644 --- a/openresty/1.27.1.1-1-focal/1pwaf/data/conf/global.json +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/conf/global.json @@ -161,6 +161,7 @@ "action": "deny" }, "log": { + "state": "on", "maxDay": 180, "maxSize": 1, "external": ["acl","ipWhite","ipBlack","geoRestrict","urlWhite","urlBlack","uaWhite","uaBlack"] diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/conf/siteConfig.json b/openresty/1.27.1.1-1-focal/1pwaf/data/conf/siteConfig.json index 19ed66cbf..87a75e295 100644 --- a/openresty/1.27.1.1-1-focal/1pwaf/data/conf/siteConfig.json +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/conf/siteConfig.json @@ -81,9 +81,15 @@ "state": "off" }, "strict": { - "state": "on", + "state": "off", "type": "strict", "code": 403, "action": "deny" + }, + "app": { + "state": "off", + "type": "app", + "action": "allow", + "rule": "" } } diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/default/index.html b/openresty/1.27.1.1-1-focal/1pwaf/data/default/index.html new file mode 100644 index 000000000..ef37b2e27 --- /dev/null +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/default/index.html @@ -0,0 +1,27 @@ + + + + + + Welcome + + + +

Welcome to 1Panel

+ + diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/default/app/Halo.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Halo.json similarity index 88% rename from openresty/1.27.1.1-1-focal/1pwaf/data/default/app/Halo.json rename to openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Halo.json index 802aaaf42..713e181e8 100644 --- a/openresty/1.27.1.1-1-focal/1pwaf/data/default/app/Halo.json +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Halo.json @@ -9,7 +9,8 @@ "/apis/api.console.halo.run/v1alpha1/posts", "/api/v1alpha1/configmaps/system", "/apis/api.console.halo.run/v1alpha1/singlepage", - "/apis/api.console.halo.run/v1alpha1/attachments/upload" + "/apis/api.console.halo.run/v1alpha1/attachments/upload", + "/apis/api.console.halo.run/v1alpha1/attachments" ], "check": { "type": "cookie", diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/MaxKB.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/MaxKB.json new file mode 100644 index 000000000..7ded09583 --- /dev/null +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/MaxKB.json @@ -0,0 +1,16 @@ +{ + "name":"MaxKB", + "state": "on", + "rules": [ + { + "type": "whiteUrl", + "pattern": "startWith", + "values": [ + "/api/application/chat_message", + "/api/function_lib", + "/function_lib/pylint", + "/api/dataset" + ] + } + ] +} \ No newline at end of file diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/SiYuan.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/SiYuan.json new file mode 100644 index 000000000..2fbdd7540 --- /dev/null +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/SiYuan.json @@ -0,0 +1,27 @@ +{ + "name":"SiYuan", + "state": "on", + "rules": [ + { + "type": "whiteUrl", + "pattern": "contain", + "method": "POST", + "values": [ + "/api/transactions" + ], + "check": { + "type": "cookie", + "pattern": "eq", + "values": ["siyuan"] + } + }, + { + "type": "whiteUrl", + "pattern": "contain", + "method": "POST", + "values": [ + "/api/notebook/lsNotebooks" + ] + } + ] +} \ No newline at end of file diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Typecho.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Typecho.json new file mode 100644 index 000000000..7e83525e9 --- /dev/null +++ b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/Typecho.json @@ -0,0 +1,20 @@ +{ + "name":"Typecho", + "state": "on", + "rules": [ + { + "type": "whiteUrl", + "pattern": "startWith", + "values": [ + "/index.php/action/contents-post-edit", + "/index.php/action/contents-page-edit", + "/index.php/action/users-profile" + ], + "check": { + "type": "cookie", + "pattern": "eq", + "values": ["PHPSESSID"] + } + } + ] +} \ No newline at end of file diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/default/app/WordPress.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/WordPress.json similarity index 100% rename from openresty/1.27.1.1-1-focal/1pwaf/data/default/app/WordPress.json rename to openresty/1.27.1.1-1-focal/1pwaf/data/rules/app/WordPress.json diff --git a/openresty/1.27.1.1-1-focal/1pwaf/data/rules/post.json b/openresty/1.27.1.1-1-focal/1pwaf/data/rules/post.json deleted file mode 100644 index 2722b88ff..000000000 --- a/openresty/1.27.1.1-1-focal/1pwaf/data/rules/post.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "rules": [ - { - "state": "on", - "name": "sqlInject1", - "rule": "select.+(from|limit)", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject2", - "rule": "(?:(union(.*?)select))", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject3", - "rule": "having|rongjitest", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject4", - "rule": "sleep\\((\\s*)(\\d*)(\\s*)\\)", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject5", - "rule": "benchmark\\((.*)\\,(.*)\\)", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject6", - "rule": "group\\s+by.+\\(", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject7", - "rule": "(?:from\\W+information_schema\\W)", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject8", - "rule": "(?:(?:current_)user|database|schema|connection_id)\\s*\\(", - "type": "sqlInject" - }, - { - "state": "on", - "name": "sqlInject9", - "rule": "into(\\s+)+(?:dump|out)file\\s*", - "type": "sqlInject" - }, - { - "state": "on", - "name": "args1", - "rule": "xwork.MethodAccessor", - "type": "args", - "description": "Struts 恶意参数过滤" - }, - { - "state": "on", - "name": "args2", - "rule": "xwork\\.MethodAccessor", - "type": "args", - "description": "Struts 恶意参数过滤" - }, - { - "state": "on", - "name": "oneWordTrojan1", - "rule": "(?:define|eval|file_get_contents|include|require|require_once|shell_exec|phpinfo|system|passthru|preg_\\w+|execute|echo|print|print_r|var_dump|(fp)open|alert|showmodaldialog)\\(", - "type": "oneWordTrojan" - }, - { - "state": "on", - "name": "protocolFilter1", - "rule": "(gopher|doc|php|glob|file|phar|zlib|ftp|ldap|dict|ogg|data)\\:\\/", - "type": "protocolFilter", - "description": "协议过滤" - }, - { - "state": "on", - "name": "oneWordTrojan2", - "rule": "\\$_(GET|post|cookie|files|session|env|phplib|GLOBALS|SERVER)\\[", - "type": "oneWordTrojan" - }, - { - "state": "on", - "name": "xss1", - "rule": "\\<(iframe|script|body|img|layer|div|meta|style|base|object|input)", - "type": "xss" - }, - { - "state": "on", - "name": "xss2", - "rule": "(onmouseover|onerror|onload)\\=", - "type": "xss" - }, - { - "state": "on", - "name": "xss3", - "rule": "base64_decode\\(", - "type": "xss" - }, - { - "state": "on", - "name": "dirFilter1", - "rule": "(?:etc\\/\\W*passwd)", - "type": "dirFilter" - }, - { - "state": "on", - "name": "dirFilter2", - "rule": "java\\.lang", - "type": "dirFilter" - } - ] -} \ No newline at end of file