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

[5.9] Registry login interactive mode cannot read password/token over 128 chars long #6614

Merged
merged 1 commit into from
May 26, 2023

Conversation

yim-lee
Copy link
Member

@yim-lee yim-lee commented May 25, 2023

Cherry-pick #6562

…hars long (apple#6562)

* Registry login interactive mode cannot read password/token over 128 chars long

Motivation:
`swift package-registry login` in interactive mode truncates input when the provided password/token is more than 128 chars long. This is a limitation of `getpass`.

rdar://109372320

Modifications:
- Use `readpassphrase`, which allows custom input length, instead of `getpass`.
- Improve error message when the provided password/token is too long.
- Increase password/token length limit to 512 chars

* Continue using getpass on non-Darwin, non-Windows platforms

* include more details in Windows error messages
@yim-lee yim-lee added the swift 5.9 This PR targets the 5.9 branch label May 25, 2023
@yim-lee
Copy link
Member Author

yim-lee commented May 25, 2023

@swift-ci please smoke test

@yim-lee
Copy link
Member Author

yim-lee commented May 25, 2023

@swift-ci please test Windows platform

@yim-lee yim-lee merged commit 0872d6f into apple:release/5.9 May 26, 2023
5 checks passed
@yim-lee yim-lee deleted the password-limit-5.9 branch May 26, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 5.9 This PR targets the 5.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants