418sec / huntr

Public Roadmap | huntr.dev
https://huntr.dev
263 stars 89 forks source link

As a user, I want to be able to pass any valid GitHub repository URL into `target-finder`. #2071

Closed geeknik closed 3 years ago

geeknik commented 3 years ago

This is more of an annoyance than anything functional. For example, at the top of https://huntr.dev/bounties/1625486747136-riyadhalnur/node-base64-image/, it says Code Injection in riyadhalnur/node-base64-image. It links to www.github.com, which in and of itself isn't really an issue, however, if you right click and copy that link and then drop the link into the box at https://huntr.dev/bounties/disclose/, the page throws an exception and says Please enter a valid GitHub repository URL, including https://...

2021-07-05_10-38

adam-nygate commented 3 years ago

@psmoros I think we have to re-write how we check the repo URL - will work with you on it

ranjit-git commented 3 years ago

If you remove www from github repo url then it will be accepted

michaellrowley commented 3 years ago

Assuming that huntr uses Regex, this would match the above URL and a few other edge cases:

^(https:\/\/)?(www\.)?github.com\/[a-zA-Z0-9\-\_]{1,}\/[a-zA-Z0-9\-\_]{1,}(\/)?$
JamieSlome commented 3 years ago

Sorted and now live 🎉