sepandhaghighi / sepandhaghighi/githubp
[Bug]: Reject non-GitHub URLs in `parseGithubPath()`
@sepandhaghighi is already working on this.
Since Sep 1, 2026.
- Dominant language
- JavaScript
- Stars
- 15
- Forks
- 0
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 2
Description
Contact details
me@sepand.tech
What happened?
parseGithubPath() accepts any URL that starts with http and extracts its first two path segments as a GitHub username and repository name. As a result, URLs from unrelated domains can be incorrectly converted into GitHub Pages URLs.
For example:
https://example.com/alice/project
can be interpreted as:
https://alice.github.io/project
Steps to reproduce
-
Open GitHubP.
-
Click Go.
Expected behavior
Only URLs belonging to github.com should be accepted when a full URL is provided.
For example:
https://github.com/alice/project
https://www.github.com/alice/project
should be accepted, while:
https://example.com/alice/project
should be rejected with the existing Invalid GitHub path error.
Actual behavior
A URL from an unrelated domain can be parsed as a valid GitHub path and redirected to the corresponding GitHub Pages URL.
Device type
Desktop
Browser
Chrome
GitHubP version
GitHubP 0.6
Relevant log output
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.