Description
The /api/streak route accepts a user query parameter and passes it directly
to the GitHub GraphQL API without any prior validation. Invalid inputs (empty
strings, usernames with illegal characters, excessively long strings, or
non-existent users) result in either an unhandled runtime error or a broken/
blank SVG with no user-friendly feedback rendered in the badge itself.
Steps to Reproduce
- Visit
https://commitpulse.vercel.app/api/streak?user= (empty)
- Visit
https://commitpulse.vercel.app/api/streak?user=!!invalid!!
- Visit
https://commitpulse.vercel.app/api/streak?user=this-user-does-not-exist-xyz-abc-123
Expected Behavior
A styled error SVG (matching the current theme) with a message
like "User not found" or "Invalid username".
Screenshots / Logs
GitHub Username (If applicable)
user-123
Environment
Chrome
Description
The
/api/streakroute accepts auserquery parameter and passes it directlyto the GitHub GraphQL API without any prior validation. Invalid inputs (empty
strings, usernames with illegal characters, excessively long strings, or
non-existent users) result in either an unhandled runtime error or a broken/
blank SVG with no user-friendly feedback rendered in the badge itself.
Steps to Reproduce
https://commitpulse.vercel.app/api/streak?user=(empty)https://commitpulse.vercel.app/api/streak?user=!!invalid!!https://commitpulse.vercel.app/api/streak?user=this-user-does-not-exist-xyz-abc-123Expected Behavior
A styled error SVG (matching the current theme) with a message
like
"User not found"or"Invalid username".Screenshots / Logs
GitHub Username (If applicable)
user-123
Environment
Chrome