Title: fix: handle tags like debian/2%2.6-21 as identifiers by emanueleaina · Pull Request #1336 · python-gitlab/python-gitlab · GitHub
Open Graph Title: fix: handle tags like debian/2%2.6-21 as identifiers by emanueleaina · Pull Request #1336 · python-gitlab/python-gitlab
X Title: fix: handle tags like debian/2%2.6-21 as identifiers by emanueleaina · Pull Request #1336 · python-gitlab/python-gitlab
Description: Git refnames are relatively free-form and can contain all sort for special characters, not just / and #, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 standard for storing packaging in git repositories mandates the use of the % character in tags in some cases like debian/2%2.6-21. Unfortunately python-gitlab currently only escapes / to / and in some cases # to #. This means that when using the commit API to retrieve information about the debian/2%2.6-21 tag only the slash is escaped before being inserted in the URL path and the % is left untouched, resulting in something like /api/v4/projects/123/repository/commits/debian/2%2.6-21. When urllib3 sees that, it detects the invalid % escape and then urlencodes the whole string, resulting in /api/v4/projects/123/repository/commits/debian%2F2%2.6-21, where the original / got escaped twice and produced %2F. To avoid the issue, fully urlencode identifiers and parameters to avoid the urllib3 auto-escaping in all cases. I've run the unit tests but not the integration ones, so in theory this does not break anything but I can't really confirm it. All I can firmly say is that it fixes the issue I hit. :D
Open Graph Description: Git refnames are relatively free-form and can contain all sort for special characters, not just / and #, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 standard...
X Description: Git refnames are relatively free-form and can contain all sort for special characters, not just / and #, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 stan...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/pull/1336
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:af2ee801-2628-3987-c4ee-265ec058306f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 83C0:2928DA:5C50B4:79C45C:6972E535 |
| html-safe-nonce | 0c051ff92c9f4c35fa08ede1c9686144cd1e99abece7ab63163a8312a6137d1b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0MwOjI5MjhEQTo1QzUwQjQ6NzlDNDVDOjY5NzJFNTM1IiwidmlzaXRvcl9pZCI6Ijg0NzgwMDgxOTcwMDY5NDM1NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c64e317acd5ab612e4871172a5db617d1d326a54225f634eded0afc01258535f |
| hovercard-subject-tag | pull_request:580713832 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-gitlab/python-gitlab/pull/1336/checks |
| twitter:image | https://avatars.githubusercontent.com/u/145522?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/145522?s=400&v=4 |
| og:image:alt | Git refnames are relatively free-form and can contain all sort for special characters, not just / and #, see http://git-scm.com/docs/git-check-ref-format In particular, Debian's DEP-14 standard... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 824b30a290fe1f3775d1c3b755ace6ec71165752363f95d9255c1b87220040e4 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git |
| octolytics-dimension-user_id | 28886265 |
| octolytics-dimension-user_login | python-gitlab |
| octolytics-dimension-repository_id | 8077625 |
| octolytics-dimension-repository_nwo | python-gitlab/python-gitlab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8077625 |
| octolytics-dimension-repository_network_root_nwo | python-gitlab/python-gitlab |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ef892904a22cef6ce15e4347cbf70e4cbfdc883 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width