update
This commit is contained in:
@@ -16,6 +16,9 @@ export const bannedUserNames = [
|
||||
"backup", // 备份相关
|
||||
"backups", // 备份相关
|
||||
"tmp", // 临时相关
|
||||
"var", // 变量相关
|
||||
"www", // 网站相关
|
||||
"app", // 应用相关
|
||||
]
|
||||
|
||||
/**
|
||||
@@ -40,5 +43,20 @@ export const appIsBanned = (appname: string): boolean => {
|
||||
if (appname.endsWith('.')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export const userPathIsBanned = (appname: string): boolean => {
|
||||
if (appname.startsWith('.')) {
|
||||
return true;
|
||||
}
|
||||
if (appname.endsWith('.')) {
|
||||
return true;
|
||||
}
|
||||
const bans = ['.php', '.json', '.yml', '.db', '.env', '.backup', 'database.sql', 'db.sql', 'backup.zip',];
|
||||
if (bans.some(ban => appname.includes(ban))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user