Skip to content

Fix 2FA QR code rendering#28

Merged
flemzord merged 1 commit into
mainfrom
agent/fix-2fa-qr-code
Jul 24, 2026
Merged

Fix 2FA QR code rendering#28
flemzord merged 1 commit into
mainfrom
agent/fix-2fa-qr-code

Conversation

@flemzord

Copy link
Copy Markdown
Member

What changed

  • Strip only the XML declaration from the generated QR-code SVG.
  • Add a controller regression test verifying that the enrollment page contains the SVG and its otpauth link.

Why

rqrcode 3.x serializes the XML declaration and SVG on one line. The previous greedy expression matched from the XML declaration through the end of that line, deleting the entire SVG and leaving the 2FA enrollment page without a QR code.

Impact

Users can once again scan the QR code when enrolling in TOTP two-factor authentication.

Validation

  • bundle exec rspec spec/controllers/settings_controller_spec.rb
  • bundle exec standardrb app/controllers/settings_controller.rb spec/controllers/settings_controller_spec.rb
  • Docker image build using the project Dockerfile

@flemzord
flemzord marked this pull request as ready for review July 24, 2026 11:10
@flemzord
flemzord merged commit 1778819 into main Jul 24, 2026
3 checks passed
@flemzord
flemzord deleted the agent/fix-2fa-qr-code branch July 24, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant