Security & Performance Overview
This page summarizes the main protections and optimizations currently active in the Meeting Room Booking System.
Application Security
- Login & kiosk admin protection – sessions use secure cookies (HttpOnly, SameSite=Lax) and regenerate IDs on successful login to reduce session fixation risk.
- Cross-Site Request Forgery (CSRF) – all important forms and selected API calls carry a hidden security token to prevent unauthorized cross-site submissions.
- Cross-Site Scripting (XSS) – dynamic content is escaped through the
h() helper and templates avoid inserting raw HTML from user input.
- Prepared SQL statements – all database queries use bound parameters to protect against SQL injection.
- Rate limiting – login and kiosk admin login have soft rate limits per browser session to slow down brute-force attempts.
- Security headers – responses include headers such as
X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy and a Content-Security-Policy tuned for this app.
- File uploads – kiosk background uploads check MIME type, size, and extension, and store images with a fixed filename to avoid executable uploads.
Performance & Database
- Efficient booking queries – key paths such as calendar, kiosk current/next view, and My Bookings rely on indexed columns (room, user, time, status).
- Additional indexes – the system adds safe indexes for bookings and audit logs to keep queries fast as data grows.
- Pagination – large lists (My Bookings, Admin audit logs) are paginated to avoid loading too much data at once.
- Audit logging – important actions (logins, bookings, admin changes) are recorded in the audit log table for accountability.
Growth & Maintenance
- No automatic deletion – bookings and audit logs are not auto-removed by the app; retention is controlled manually from the database.
- Admin guidance – the Admin → Settings page includes example SQL snippets for safely archiving old audit logs and very old bookings.
- Uploads – kiosk background images are rotated in place so the uploads folder does not grow unexpectedly.
Infrastructure Responsibilities
Additional protection against large-scale attacks (DDoS, network-level abuse) should be handled by infrastructure such as reverse proxies, firewalls, WAF, and TLS termination.