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

Allowing empty secrets to be set #36400

Merged
merged 1 commit into from Apr 10, 2020

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented Apr 9, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets None
License MIT
Doc PR Not needed

Setting secrets to an empty string is a valid value - you can already do this by consuming from an empty file or stdin with no input. But it's not currently possible to use the interactive prompt to set a secret to an empty string. This fixes that.

@@ -106,12 +111,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
throw new \InvalidArgumentException(sprintf('File is not readable: "%s".', $file));
}

if (null === $value) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look above at the possible ways to set $value, a null value was only possible when using the askHidden() interactive prompt. So now, it should not be possible to have null at this point.

@weaverryan weaverryan requested a review from lyrixx as a code owner April 9, 2020 14:53
@weaverryan weaverryan changed the base branch from master to 4.4 April 9, 2020 14:54
@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Apr 9, 2020
@nicolas-grekas
Copy link
Member

Thank you @weaverryan.

@nicolas-grekas nicolas-grekas merged commit 2dd5fe6 into symfony:4.4 Apr 10, 2020
@weaverryan weaverryan deleted the fix-allow-empty-secrets branch April 27, 2020 13:47
This was referenced Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants