mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-10 00:30:13 +09:00
Merge #335: reject invalid QR code requests before rendering
This commit is contained in:
@@ -7,5 +7,7 @@ class QrCodeController < ApplicationController
|
||||
|
||||
expires_in 1.year, public: true
|
||||
render plain: qr_code, content_type: "image/svg+xml"
|
||||
rescue ArgumentError, RQRCodeCore::QRCodeRunTimeError
|
||||
head :bad_request
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user