Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/acuant_sdk_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AcuantSdkController < ApplicationController

def show
# Only render files on an allowlist to prevent path traversal issues
render plain: 'Not found', status: :not_found unless requested_asset_permitted?
return render(plain: 'Not found', status: :not_found) unless requested_asset_permitted?

SecureHeaders.append_content_security_policy_directives(
request,
Expand Down
6 changes: 6 additions & 0 deletions spec/requests/acuant_sdk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,11 @@

expect(response.status).to eq(404)
end

it 'renders a 404 for map files' do
get '/verify/doc_auth/AcuantImageProcessingService.wasm.map'

expect(response.status).to eq(404)
end
end
end