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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f80e7217-cd3e-b34d-f2a1-f7930a05b007 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9910:16BB7B:168F61C:1EE0FEF:69733E61 |
| html-safe-nonce | 908161cefbd3a4ab174c3797946120c0e7be0f9341ed6a4991df119a22065033 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTEwOjE2QkI3QjoxNjhGNjFDOjFFRTBGRUY6Njk3MzNFNjEiLCJ2aXNpdG9yX2lkIjoiNzUyOTI3MzYyNTI0NTA3Mjk5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1bc30898d0df2668adc2067074f592ac538bd5bd1fc98fa3a328b47719d42bd4 |
| hovercard-subject-tag | pull_request:580713832 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 | 574266c5e0389fb19fcea86ddb6d5b0008f148ada57d7a37ec4c90a19caee8f6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3c64ddf9c1ec6ebf99c7b6faf0c61676d36f64c0 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width