MCPcopy Create free account
hub / github.com/F12FLASH/CTF / sanitizeChallengeId

Function sanitizeChallengeId

4.Stackless Stack/server/routes.ts:69–75  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

67}
68
69function sanitizeChallengeId(id: string): string | null {
70 const sanitized = id.replace(/[^a-zA-Z0-9-_]/g, '');
71 if (sanitized.length === 0 || sanitized.length > 100) {
72 return null;
73 }
74 return sanitized;
75}
76
77export async function registerRoutes(app: Express): Promise<Server> {
78 app.use(validateInput);

Callers 1

registerRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected