Skip to content

Commit

Permalink
Encode s3 keys in source_url
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Oct 25, 2024
1 parent 0286d33 commit b03309a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/subscription_client_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_source_url(bucket)
return nil unless access_key_id && secret_access_key && s3_client
return nil unless can_access_bucket?(bucket)

"s3://#{access_key_id}:#{secret_access_key}@#{bucket}"
"s3://#{CGI.escapeURIComponent(access_key_id)}:#{CGI.escapeURIComponent(secret_access_key)}@#{bucket}"
end

def can_access_bucket?(bucket)
Expand Down

0 comments on commit b03309a

Please sign in to comment.