core
core copied to clipboard
Invalid Password validation in CaptivePortal
Description
Passwords containing special characters (reproducible with a password containing exclamation mark and single quotes) are not correctly validated resulting in the user not able to login on the captive portal page.
Tested with OPNsense 22.1.4_1-amd64
Workaround
In https://github.com/opnsense/core/blob/6ef03ba7e467452731084051c12e87b7284e828c/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/AccessController.php#L149-L152
change
$this->request->getPost("password", "string")
to
$this->request->getPost("password")
lets the user login.