microsoft / ghcrawler

Crawl GitHub APIs and store the discovered orgs, repos, commits, ...
MIT License
373 stars 90 forks source link

orgList is not remapped to lowercase when changing via PATCH route #178

Open k----n opened 4 years ago

k----n commented 4 years ago

The problem lies here: https://github.com/microsoft/ghcrawler/blob/0ac110780f4e8ec915dfb47f55e55cccf80892d7/lib/crawler.js#L30-L37

The path is not only /orgList https://github.com/microsoft/ghcrawler/blob/0ac110780f4e8ec915dfb47f55e55cccf80892d7/lib/crawler.js#L32

When reassigning this.options.orgList, this.options.orgList.map(element => element.toLowerCase()) should be used and not orgList.value.map(element => element.toLowerCase()). https://github.com/microsoft/ghcrawler/blob/0ac110780f4e8ec915dfb47f55e55cccf80892d7/lib/crawler.js#L35