Adds foundational utilities for XSS prevention without applying them yet.
This prepares the codebase for comprehensive input sanitization in a follow-up PR.
Changes:
- Added isomorphic-dompurify and jsdom dependencies
- Created sanitization utilities in src/utils/sanitization.js
- Includes recursive object sanitization functions
- Provides Express middleware for body and query sanitization
Infrastructure only - no behavioral changes yet.
Files added:
- src/utils/sanitization.js (sanitization utilities)
- package.json (new dependencies)
Next steps:
- Apply sanitization middleware in follow-up PR
- Enable XSS protection across application
- Removed all references to the unused prop from the JSDoc and usage example in the CustomGauge component.
- Ensured PropTypes and documentation accurately
- Replace hardcoded button text with translation
- Fix status box translation to avoid showing removed title
- Add conditional rendering for optional gauge metrics
- Remove 'System diagnostics' title and divider line
- Add infrastructure-style status boxes with dynamic status
- Update gauge components to use BaseContainer styling
- Match infrastructure page layout and spacing
Resolves#2725
- Added a new `/games` route in `monitorRoute.js` to fetch all supported games.
- Implemented `getAllGames` method in `monitorController.js` using the `gamedig` library.
- Introduced `useFetchMonitorGames` hook in `monitorHooks.js` to fetch game data in the frontend.
- Updated `UptimeCreate` page to support game server monitoring:
- Added a new monitor type `"game"`.
- Dynamically fetches and displays game options using the new `/games` API.
- Removed hardcoded `GAMES` object and replaced it with dynamic fetching from the backend.
- Updated `NetworkService.js` with a new `getMonitorGames` method for API calls.
This update introduces game server monitoring functionality, allowing users to monitor game servers dynamically.