🛡️ Sentinel: [CRITICAL] Fix client-side auth bypass in DisplayRulesManager - #104
🛡️ Sentinel: [CRITICAL] Fix client-side auth bypass in DisplayRulesManager#104aperetti wants to merge 1 commit into
Conversation
…nager
Removed hardcoded frontend credentials ('admin'/'admin') in `DisplayRulesManager.tsx` that allowed local bypass of the authentication screen. The client now properly verifies credentials by making an authenticated API call (`fetchDisplayConfigs()`) to the backend and checking for success before storing the token and granting access to the UI.
Co-authored-by: aperetti <482392+aperetti@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🚨 Severity: CRITICAL
💡 Vulnerability: The frontend
DisplayRulesManagercomponent used insecure client-side authentication by checking against hardcoded credentials and trusting a locally generated Base64 token without server validation.🎯 Impact: An attacker could trivially bypass the login screen by either typing the hardcoded password or manipulating
localStorage, gaining unauthorized access to the admin UI overlay.🔧 Fix: Removed the hardcoded credential checks. Replaced with a secure backend validation step where
fetchDisplayConfigs()is called with the generated token; UI access is only granted if the server returns a successful response.✅ Verification:
npm testpasses for the component, TypeScript typechecking passes, and manual review confirms the backend call securely guards state changes.PR created automatically by Jules for task 7123989805348526084 started by @aperetti