10000 Dotenv doesn't unescape backslashes · Issue #29202 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Dotenv doesn't unescape backslashes #29202

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

Closed
nicolas-grekas opened this issue Nov 13, 2018 · 6 comments
Closed

Dotenv doesn't unescape backslashes #29202

nicolas-grekas opened this issue Nov 13, 2018 · 6 comments

Comments

@nicolas-grekas
Copy link
Member
nicolas-grekas commented Nov 13, 2018

Found in Symfony 4.2 but should exist in 3.4

When parsing a .env file containing FOO=A\\B, dotenv loads it as A\\B.
But it should remove one slash instead, and load value A\B (same as what the shell does when reading the same value).

@nicolas-grekas nicolas-grekas changed the title Dotenv doesn't unescape backslahes Dotenv doesn't unescape backslashes Nov 13, 2018
@Taluu
Copy link
Contributor
Taluu commented Nov 13, 2018

Wasn't this already reported and rejected ? I think it was because of some stuff because of docker's loading env was problematic as it was removing slashes and dotenv didn't.

Not really sure, but I'd be 👍 to remove slashes anyway. :}

@nicolas-grekas
Copy link
Member Author

That's quite possible. Can you find the link please?

@Taluu
Copy link
Contributor
Taluu commented Nov 14, 2018

Nevermind, it was about surrounding '/"s which it seems is not standard.

So 👍

@nicolas-grekas
Copy link
Member Author

Do you have a link?

@Taluu
Copy link
Contributor
Taluu commented Nov 14, 2018

Here goes, but as I said, it's unrelated : #27594

@xabbuh
Copy link
Member
xabbuh commented Nov 14, 2018

see #29222

@fabpot fabpot closed this as completed Nov 24, 2018
fabpot added a commit that referenced this issue Nov 24, 2018
…xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] properly parse backslashes in unquoted env vars

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29202
| License       | MIT
| Doc PR        |

Commits
-------

785fff5 properly parse backslashes in unquoted env vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0