Repository navigation
v3.81.3: Security hardening - #24
Merged
Merged
Conversation
… page twofactor_setup.php stores the TOTP secret as hex, but verify2fa.php passed it to TwoFactorAuth::verify(), which base32-decodes its input. Decoding hex as base32 yields the wrong key, so enrolment succeeded and every login code was then rejected. Add TwoFactorAuth::verifyStored(), which decodes the stored hex, and use it at login. The challenge page now matches the login screen instead of rendering inside the app layout. Login styles move to assets/css/auth.css, shared by both pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Escape firewall-reported values where they are rendered (firewall list tooltips, command log, command output, diagnostics, health monitor) and validate the network fields at check-in. Event handlers pass values as JSON instead of HTML-escaped strings inside JavaScript quotes. - Agent auto-update passes the staged package's SHA-256 to the installer and offers nothing when no verified package is staged. - Limit two-factor attempts and count them toward the account lockout; lock out per (username, address) with an address-wide limit; require a current code to disable 2FA; the MFA-enrolment exemption checks SCRIPT_NAME. - First agent check-in must match the hardware ID reported when the token was redeemed, and the bind checks it won. Enrolment tokens never rewrite an existing firewall. - Per-session tunnel listeners bind to loopback; cleanup reports what it actually removed. Ownerless tunnel sessions are admin-only; tunnel cookies are no longer logged. - Enforce customer scope on firewall pages, tunnels, command log, request queue and AI scans. Agent endpoints only update the authenticated firewall's rows. - CSRF checks on the security scanner, documentation trigger, tunnel start and AI scan. - Onboarding deploys the firewall's own key instead of a built-in one; public keys are validated and shell-quoted. Reinstall commands keep the API key out of URLs and argv and verify TLS. - Deployment packages download through Package Builder; nginx snippet denies /packages/, /config/, /sql/, /download/ and stray root files. Pushover token is no longer rendered into the page. - Replace broad sudo rules with deploy/opnmgr-nginx-wrapper and a shipped deploy/sudoers-opnsense-manager. - Remove unused tunnel_auto_login.php, tunnel_direct.php, get_firewall_id.php, api/setup_reverse_proxy.php and ajax/certbot.php; download_agent.php returns 410. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security hardening release. See CHANGELOG.md (3.81.3) for the full list.
Highlights:
deploy/opnmgr-nginx-wrapper,deploy/sudoers-opnsense-manager) replacing broad rulesNew regression suite:
tests/hardening_3_81_3_test.php(added to CI). All CI suites pass locally against a test database, including the clean-install end-to-end test.No agent change (1.8.2 unchanged), no schema change.
🤖 Generated with Claude Code