You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Input validation uses a Unicode property escape that breaks on no-ICU Node (nodejs-mobile) #520
src/server.js:1075 validates printable input with a Unicode property-escape regex:
/^\P{C}+$/u.test(str)
On Node builds without full ICU — notably nodejs-mobile (the embedded Node used for the Android app) — this throws at module-load time:
SyntaxError: Invalid regular expression: /^\P{C}+$/: Invalid property name
Because it's a top-level regex literal, the whole module fails to import and the server never starts.
Impact
JSS can't boot on no-ICU / small-ICU runtimes. Surfaced while embedding JSS in a React Native + nodejs-mobile Android app. We currently work around it downstream by rewriting the regex to an ASCII range before bundling, but JSS itself would be more portable without the property escape.
Suggested fix
Replace the \P{C} (any non-control-category char) escape with an explicit ASCII control-character exclusion that needs no ICU:
/^[^\x00-\x1f\x7f-\x9f]+$/.test(str)
This matches "no C0/C1 control chars" — close to the original intent for input sanitization, and works on every Node build. If full-Unicode control coverage is genuinely required, document a full-ICU runtime requirement instead.
Activity
melvincarvalho commentedon May 23, 2026
Surfaced by the Android (nodejs-mobile) work — tracked in #522.
fix: use ASCII control-range regex instead of \p{C} for password input (