fix: 修复 SpamBlock 配置越权 (#352)

This commit is contained in:
NikoCat233 authored and GitHub committed 2026-07-22 15:57:22 +08:00
1 parent 87d3ce35d3
commit da55756917
2 files changed
+21

No files matched your search

+3
View File
@@ -63,6 +63,9 @@ func (s *SpamBlock) SettingsHtml(ctx *context.Context, url string, requestData s
}
return fmt.Sprintf(index, s.cfg.ApiURL, s.cfg.ApiTimeout, s.cfg.Threshold)
}
if !ctx.IsAdmin {
return "No Access Privileges"
}
var cfg SpamBlockConfig
var tempCfg map[string]string