mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-11 12:07:39 +02:00
update to 6.8.27
This commit is contained in:
@@ -51,8 +51,23 @@ def check_run():
|
||||
if not public.ExecShell("lsof -i :{}".format(port_tmp[0]))[0]:
|
||||
return True,'MySQL is not installed'
|
||||
result = public.check_port_stat(int(port_tmp[0]),public.GetLocalIp())
|
||||
if result == 0:
|
||||
return True,'Risk-free'
|
||||
#兼容socket能连通但实际端口不通情况
|
||||
if result != 0:
|
||||
res=''
|
||||
if os.path.exists('/usr/sbin/firewalld'):
|
||||
res=public.ExecShell('firewall-cmd --list-all')
|
||||
elif os.path.exists('/usr/sbin/ufw'):
|
||||
try:
|
||||
res=public.ExecShell('sudo ufw status verbose')
|
||||
except:
|
||||
res=public.ExecShell('ufw status verbose')
|
||||
else:
|
||||
pass
|
||||
check_str=' '+port_tmp[0]+'/'
|
||||
if res[0].find(check_str) == -1:
|
||||
return True,'Risk-free'
|
||||
else:return True,'Risk-free'
|
||||
|
||||
|
||||
fail2ban_file = '/www/server/panel/plugin/fail2ban/config.json'
|
||||
if os.path.exists(fail2ban_file):
|
||||
|
||||
@@ -37,7 +37,7 @@ def check_run():
|
||||
port = public.readFile(port_file)
|
||||
if not port: return True,'Rick-free'
|
||||
port = int(port)
|
||||
if port != 8888 and port != 7800:
|
||||
if port != 8888:
|
||||
return True,'Rick-free'
|
||||
return False,'The panel port is the default port ({}), which may cause unnecessary security risks'.format(port)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def check_run():
|
||||
@return tuple (status<bool>,msg<string>)
|
||||
'''
|
||||
not_uini = []
|
||||
site_list = public.M('sites').where('status=?',(1,)).field('name,path').select()
|
||||
site_list = public.M('sites').where('status=? AND project_type=?',(1,'PHP')).field('name,path').select()
|
||||
for s in site_list:
|
||||
path = get_site_run_path(s['name'],s['path'])
|
||||
user_ini = path + '/.user.ini'
|
||||
|
||||
Reference in New Issue
Block a user