Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔒️(frontend) valide ':roomId' path using a regex
Enhanced security by ensuring users are redirected to a 404 error page if they pass an incorrect roomId path, either intentionally or unintentionally. This is a critical security mechanism that should be included in our MVP. Let's discuss extracting hardcoded elements, such as lengths or the separator, into proper constants to improve code maintainability. I was concerned that this might make the code harder to read, it could enhance clarity and reusability in the long term. I prefer exposing the roomIdRegex from the same location where we generate IDs. However, this increases the responsibility of that file. Lmk if you have any suggestion for a better organization. Additionally, the current 404 error page displays a 'Page not found' message for invalid room IDs. Should we update this message to 'Invalid room name' to provide more context to the user?
- Loading branch information