From 48d527890701933af5ee7d7dc989b7445974165b Mon Sep 17 00:00:00 2001 From: jingxin he Date: Tue, 9 Jun 2020 12:27:16 +0800 Subject: [PATCH] Update start_sync.php fix(add filter) --- GatewayWorker/Applications/githubT/start_sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GatewayWorker/Applications/githubT/start_sync.php b/GatewayWorker/Applications/githubT/start_sync.php index f46a3a1..9543ba1 100644 --- a/GatewayWorker/Applications/githubT/start_sync.php +++ b/GatewayWorker/Applications/githubT/start_sync.php @@ -42,7 +42,7 @@ $task_worker->onMessage = function ($connection, $task_data) use ($webDir,$datat break; } } - if (preg_match("/%|\"|\.\.|\\\|\?|&|reboot|rm |mv |shutdown|<|>|sh |;|'/",$dataArr['url']) + if (preg_match("/%|\"|\.\.|\\\|\?|\||`|&|reboot|rm |mv |shutdown|<|>|sh |;|'/",$dataArr['url']) || ( !preg_match("/^((https|http):\/\/)?([\w\.\s\S\/\-\_^]+?)\.(tar\.gz|gz|tgz|tar\.bz2|bz2|msi|tar|zip|tar\.xz|tar\.z|rpm|deb|exe|apk|dmg|7z|rar)$/iu",$dataArr['url'],$ext)