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

Fix bug where secret values provided in env files were parsed as list. #7422

Merged
merged 5 commits into from
Jul 9, 2024

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Jul 8, 2024

Values for secret params defined using defineSecret are not supposed to be provided in env files. Instead, secret values should be created and managed in Cloud Secret Manager.

However, users often do include values for secret params in their env files, and today CLI incorrectly treats it as a list due to a bug that assumed that secret values will never be provided in the env files.

The change here treats values for secrets in env files as string.

Fixes firebase/firebase-functions#1567

@joehan joehan merged commit 587e593 into master Jul 9, 2024
41 checks passed
@joehan joehan deleted the dl-secret-params branch July 9, 2024 17:03
@tzappia
Copy link

tzappia commented Jul 10, 2024

Nice to see this fixed! FYI, one of the reasons secrets end up in .env files is because of a bug when using the emulator and a demo- project. As a workaround to the bug, putting an empty secret in the .env file works, but perhaps some devs forget that this is just a workaround and the var should just be empty. See more here: #5520 (comment)

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.

defineSecret creates a list of values in Secret Manager
4 participants