Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case-insensitive string comparison for allowed Git organizations #629

Closed
mlegner opened this issue Mar 7, 2024 · 1 comment · Fixed by #643
Closed

Case-insensitive string comparison for allowed Git organizations #629

mlegner opened this issue Mar 7, 2024 · 1 comment · Fixed by #643
Labels
enhancement New feature or request

Comments

@mlegner
Copy link
Contributor

mlegner commented Mar 7, 2024

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.

@mlegner mlegner added the enhancement New feature or request label Mar 7, 2024
@pmnlla
Copy link
Contributor

pmnlla commented Mar 26, 2024

Should be a fairly easy fix, no? Just convert each namespace to lowercase or uppercase before comparison.

@mergify mergify bot closed this as completed in #643 Mar 26, 2024
mergify bot pushed a commit that referenced this issue Mar 26, 2024
Fixed #629. The primary reason for this PR is documented there, as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants