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.
@@ -17,7 +17,8 @@ const errorHandler = require('./middleware/error_handler.js');
17
17
  */
18
18
  const allowedOrigins = [
19
19
  'https://bulltrackers.web.app',
20
- 'http://172.26.96.1:8000'
20
+ 'http://172.26.96.1:8000',
21
+ 'http://127.0.0.1:8000'
21
22
  ];
22
23
 
23
24
  /**
@@ -20,9 +20,12 @@ const router = express.Router();
20
20
 
21
21
  // Input validation schemas
22
22
  const registerTokenSchema = z.object({
23
- token: z.string().min(100).max(500), // FCM tokens are typically 150-180 chars
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.726",
3
+ "version": "1.0.728",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [