mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-22 09:58:38 +00:00
fix: harden token search with pagination, rate limiting and input validation
- Add configurable per-user token creation limit (max_user_tokens) - Sanitize search input patterns to prevent expensive queries - Add per-user search rate limiting (by user ID) - Add pagination to search endpoint with strict page size cap - Skip empty search fields instead of matching nothing - Hide internal errors from API responses - Fix Interface2String float64 formatting causing config parse failures - Add float-string fallback in config system for int/uint fields
This commit is contained in:
@@ -77,6 +77,9 @@ const OperationSetting = () => {
|
||||
'checkin_setting.enabled': false,
|
||||
'checkin_setting.min_quota': 1000,
|
||||
'checkin_setting.max_quota': 10000,
|
||||
|
||||
/* 令牌设置 */
|
||||
'token_setting.max_user_tokens': 1000,
|
||||
});
|
||||
|
||||
let [loading, setLoading] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user