test: add comprehensive test coverage and improve code quality
- Add new test files for auth, service, and handler modules - Improve test organization and coverage - Refactor code for better maintainability - Add captcha, settings, stats, and theme handler tests - Add auth module tests (CAS, OAuth, password, SSO, state) - Add service layer tests for auth, export, permissions, roles - All Go tests pass (exit code 0) - All frontend tests pass (325 tests in 59 files)
This commit is contained in:
@@ -449,10 +449,10 @@ func isSafeURL(rawURL string) bool {
|
||||
|
||||
// 检查知名内网服务地址
|
||||
blockedHosts := []string{
|
||||
"metadata.google.internal", // GCP 元数据服务
|
||||
"169.254.169.254", // AWS/Azure/GCP 元数据服务
|
||||
"metadata.azure.internal", // Azure 元数据服务
|
||||
"100.100.100.200", // 阿里云元数据服务
|
||||
"metadata.google.internal", // GCP 元数据服务
|
||||
"169.254.169.254", // AWS/Azure/GCP 元数据服务
|
||||
"metadata.azure.internal", // Azure 元数据服务
|
||||
"100.100.100.200", // 阿里云元数据服务
|
||||
}
|
||||
for _, blocked := range blockedHosts {
|
||||
if host == blocked {
|
||||
|
||||
Reference in New Issue
Block a user