Case-insensitive string comparison for allowed Git organizations
mlegner opened this issue · comments
Problem description
GitHub and GitLab namespaces (user names, organizations) are case-insensitive. So both github.com/MLeGNer and github.com/mlegner point to the exact same thing. The comparison for allowed organizations in cargo-deny, however, is case-sensitive. This means that the organization needs to be listed with all capitalizations that are used.
For direct dependencies one can control the capitalization, but for indirect ones this is not possible.
Suggested solution
Perform the check for allowed organizations in a case-insensitive way. AFAICT, this means changing the code here.
Should be a fairly easy fix, no? Just convert each namespace to lowercase or uppercase before comparison.