Investigate treatment of whitespace in route parameters
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
Brought to our attention via a production bug #4982: at least this badge accepts trailing spaces in the route parameter. A brief discussion ensued at https://github.com/badges/shields/pull/4983#discussion_r418226181.
I imagined, and still do, that _most_ of our routes should be limited to characters like A-Za-z0-9_-. Most usernames, project names, etc. cannot include whitespace.
We may want to think about a global change to the default route-component regex, with overrides in places where whitespace is acceptable.
Contributor guide
Research direction
Start by reviewing production bug #4982 and the discussion in pull request #4983, which provide the current evidence about trailing spaces in route parameters. Determine the intended default route-component behavior and where exceptions would be needed; the issue is complete only once that scope and approach are settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100