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

Be strict about env var names. #372

Closed

Conversation

ericsnowcurrently
Copy link

@ericsnowcurrently ericsnowcurrently commented Feb 5, 2019

Currently dotenv.parse() allows environment variable names which aren't actually valid for environment variables. This change ensures that they are.

@maxbeatty
Copy link
Contributor

Can you elaborate on what makes for a valid environment variable? process.env is just an object and that’s what we are trying to support populating.

If we are going to update the battle-tested regex, I’d like to see a lot of tests.

@ericsnowcurrently
Copy link
Author

I was thinking of shells. If folks are using .env files for more than actual environment variables then yeah a broader regex makes sense. Regardless, I can filter bogus names after the fact.

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.

2 participants