Add optional user authentication requirement for eNOTF access - #131
Conversation
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
…ecking Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
|
@copilot Wenn der User vom enotf zum login weitergeleitet wird, wird er danach auf die /index.php und nicht zurück ans enotf weitergeleitet |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Fixed in commit 94f07fa. The issue was that the session variable wasn't being saved before the redirect. Added |
|
@copilot You still get redirected to /index.php instead of /enotf/ |
…es redirect parameter Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Fixed in commit 0cf901d. The issue was that |
✅ Implementation Complete - Ready for Review
Summary
This PR implements an optional security feature requiring user authentication for eNOTF access, addressing the issue where anyone with the PIN could access emergency protocols.
Changes Made
Configuration (config.php)
ENOTF_REQUIRE_USER_AUTHconstant (default:false)New Middleware
assets/functions/enotf/user_auth_middleware.php=== false) to prevent bypassFiles Updated
Security Model
Before:
After (when ENOTF_REQUIRE_USER_AUTH = true):
Authentication Flow
?redirect=enotfparameterBug Fixes
session_write_close()call (followed existing codebase pattern)?redirect=enotfparameter in sessionUsage Examples
Testing & Validation
Benefits
Ready for merge! 🚀
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.