Skip to content

Fix codeartifact login --namespace to accept uppercase characters#10208

Open
carschandler wants to merge 1 commit intoaws:v2from
carschandler:fix-npm-namespace-uppercase-validation
Open

Fix codeartifact login --namespace to accept uppercase characters#10208
carschandler wants to merge 1 commit intoaws:v2from
carschandler:fix-npm-namespace-uppercase-validation

Conversation

@carschandler
Copy link
Copy Markdown

Summary

  • The npm scope name regex in NpmLogin.get_scope() only allowed lowercase letters (a-z), causing valid --namespace values containing uppercase characters to be rejected with a misleading error about URL-safe characters.
  • npm scopes are case-insensitive, so uppercase letters should be permitted. This adds A-Z to both character classes in the validation regex.
  • Adds a unit test for uppercase namespace values.

Fixes #10207

The npm scope name regex in NpmLogin.get_scope() only allowed lowercase
letters (a-z), causing valid namespace values containing uppercase
characters to be rejected with a misleading error about URL-safe
characters. npm scopes are case-insensitive, so uppercase letters
should be permitted. This adds A-Z to both character classes in the
regex and adds a corresponding unit test.

Fixes aws#10207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant