regex configuration constants

This commit is contained in:
Ryan
2025-04-11 10:44:26 -04:00
committed by GitHub
parent 337f529afd
commit 296dae96a5
28 changed files with 44 additions and 38 deletions

View File

@@ -32,7 +32,7 @@ if (!$userId) {
}
// ——— Validate userId format ———
if (!preg_match('/^[\p{L}\p{N}_\- ]+$/u', $userId)) {
if (!preg_match(REGEX_USER, $userId)) {
http_response_code(400);
error_log("Invalid userId format: {$userId}");
exit(json_encode(['status'=>'error','message'=>'Invalid user identifier']));