Skip to content

Fix Google CDN not encoding UTF-8 characters

What does this MR do and why?

Previously if a job artifact were prefaced with "©️", those bytes were stripped when rendering a Google CDN URL because the URL did not properly encode the characters. This commit now uses Addressable::URI.encode_component to do the job. CarrierWave::Utilities::Uri#encode_path does the same thing.

What's so special about "©️"? ChatGPT beautifully answered the question:

image

Relates to #396945 (closed)

How to set up and validate locally

  1. Set up Google CDN.
  2. Use https://gitlab.com/ulisesf/cdn-emoji-test/-/jobs/3951047136.
  3. Attempt to download artifacts on both jobs.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading