bulltrackers-module 1.0.726 → 1.0.728
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,9 +20,12 @@ const router = express.Router();
|
|
|
20
20
|
|
|
21
21
|
// Input validation schemas
|
|
22
22
|
const registerTokenSchema = z.object({
|
|
23
|
-
|
|
23
|
+
// Security: Prevent massive payloads with .max(4096)
|
|
24
|
+
// Flexibility: Allow any format (no regex or min length > 1)
|
|
25
|
+
token: z.string().min(1).max(4096),
|
|
26
|
+
|
|
24
27
|
platform: z.enum(['web', 'ios', 'android']).optional().default('web'),
|
|
25
|
-
userAgent: z.string().max(500).optional()
|
|
28
|
+
userAgent: z.string().max(500).optional() // Keep this limit too
|
|
26
29
|
});
|
|
27
30
|
|
|
28
31
|
const unregisterTokenSchema = z.object({
|