#5528 Apply urlencode filter to repo names templated into URLs
Merged by ngompa. Opened by music.
music/pagure urlencode-repo-name  into  master

Download 5528.patch

By applying the urlencode filter whenever repo.name is templated into a URL, this would fix https://pagure.io/fedora-infrastructure/issue/12613, which contains a detailed description of the problem and symptoms.

Basically, a + character in a URL query string can be interpreted as a space, and without this PR, URLs may contain unescaped + characters in query strings for projects like https://src.fedoraproject.org/rpms/libsigc++20 that have + in the repo name. We are then at the mercy of other systems; in Fedora, it seems like something did change quite recently, triggering https://pagure.io/fedora-infrastructure/issue/12613.

While a strict fix for the observed issue would just urlencode repo names that are templated into query strings, we really should urlencode repo names wherever they are templated into query strings in order to avoid other unforeseen issues, and doing so should cause no harm, so that’s what this PR does.

rebased onto 1b260981a806bbc14223d2f8aaba38cf56b6446d

Pull-Request has been merged by ngompa

Metadata