From 3265deed3de906279b5dc2e061ff7a7fe2093fd1 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 21 Sep 2022 17:01:41 +0800 Subject: [PATCH] Update site_api.py --- class/core/site_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 403b01474..9bffb2872 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -2369,8 +2369,10 @@ location ^~ {from} { return mw.returnJson(True, '已清除防跨站设置!') self.delUserInI(newPath) - openPath = 'open_basedir={}/:{}/'.format(newPath, sitePath) + if runPath == '/': + openPath = 'open_basedir={}/'.format(newPath) + mw.writeFile(filename, openPath + ':/www/server/php:/tmp/:/proc/') mw.execShell("chattr +i " + filename)