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

Special characters in variables? #36

Closed
bigsweater opened this issue Oct 15, 2014 · 10 comments
Closed

Special characters in variables? #36

bigsweater opened this issue Oct 15, 2014 · 10 comments

Comments

@bigsweater
Copy link

Somewhere between 1.0.6 and 1.0.8, special characters in my dotenv broke.

In my staging environment, my DB password includes a special character ($). (It's a randomly-generated password, and my host requires non-alphanumeric characters in DB passwords.) Using 1.0.6, this was fine; but after upgrading to 1.0.8, WordPress couldn't connect to the database.

Manually entering the password into wp-config (thereby bypassing Dotenv) worked.

Downgrading back to 1.0.6 did the trick for now.

Is there some way to ensure that an envvar is a string, and nothing more? (Single-quotes around the password didn't do the trick.)

Happy to help debug, but I'm not sure where to start!

@vlucas
Copy link
Owner

vlucas commented Oct 15, 2014

This is probably due to #24 that was added and tagged in v1.0.7. @kelvinj do you think you can add some tests for this and fix it?

@kelvinj
Copy link
Contributor

kelvinj commented Oct 15, 2014

@vlucas sure thing.

I'll take a look shortly.

@bigsweater
Copy link
Author

Thanks, guys.

As part of testing last night, I changed the password to one which happened to have a { (again, randomly generated); same problem. Not sure if that makes a difference for your testing.

@kelvinj
Copy link
Contributor

kelvinj commented Oct 15, 2014

@bigsweater can you provide the password, perhaps with some of the a-z characters changed?

@vlucas
Copy link
Owner

vlucas commented Oct 15, 2014

I have a random password generator - here are a few:

?BUty3koaV3%GA*hMAwH}B
N$hkFGd}b]QCHjF[rAoF96
taD?yyA]wE+QG2H9qLuF$o

@bigsweater
Copy link
Author

@kelvinj Originally, the password looked like this:

11111111~$11

The new one looks like this:

22222:22#2^{

@kelvinj
Copy link
Contributor

kelvinj commented Oct 15, 2014

@vlucas 22222:22#2^{ doesn't work as expected due to changes in #34 … everything after and including the # gets removed.

Happy to look at it, but what do you reckon is the best way of handling it?

@vlucas
Copy link
Owner

vlucas commented Oct 15, 2014

Hahaha... of course. Argh! lol

@vlucas
Copy link
Owner

vlucas commented Oct 16, 2014

This has been fixed in v1.0.9.

@vlucas vlucas closed this as completed Oct 16, 2014
@bigsweater
Copy link
Author

Excellent. Thanks. I'll test 'er out as soon as I can.

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

No branches or pull requests

3 participants