Skip to content

fix(security): align backend room/bed validation with frontend - #27

Merged
chinglin-k merged 1 commit into
mainfrom
fix/backend-room-validation
Sep 4, 2026
Merged

chinglin-k merged 1 commit into
mainfrom
fix/backend-room-validation

Conversation

@chinglin-k

Copy link
Copy Markdown
Owner

BUG-ROOM-01: roomNumber regex changed from loose /^[A-Za-z0-9-]{1,8}$/ to strict /^(H|I|G|F[ABCDEF])[0-9]{1,4}(-[0-9]+)?$/i, blocking bypass with pure numeric room numbers like '229'. BUG-BED-01: bedNumber regex changed from /^[0-9]{1,3}$/ to /^[0-9]$/, aligning backend with frontend 1-digit constraint. Tests updated: 53/53 pass.

@chinglin-k
chinglin-k merged commit 6f680e5 into main Sep 4, 2026
3 checks passed
@chinglin-k
chinglin-k deleted the fix/backend-room-validation branch September 4, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant