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

Multi-line vars not parsed correctly in dotenv #2914

Closed
amancevice opened this issue Oct 3, 2018 · 4 comments · Fixed by #3298
Closed

Multi-line vars not parsed correctly in dotenv #2914

amancevice opened this issue Oct 3, 2018 · 4 comments · Fixed by #3298
Labels
Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.

Comments

@amancevice
Copy link

This is obviously a bug in dotenv and not pipenv, but since this project vendors it I thought I'd post here.

I've opened a PR to fix this in dotenv, but for reference, if your .env file looks like this (not a real private key):

PRIVATE_KEY='-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQCiiy07/kQ/O9bQgIbg/+RjjPEfqvalNqZPHjKW0rqL3E3fGvOe
dksb0IsHJKS80Va+jtz7pO2nuLjQ2pYm7StQO/8ya0WnmndL12kTSR+Kjbr4WHJV
ZH3pXA+E2rdubHnodD5uHMrlqPsgrmAtHTTHww0GB1hfAQb1HNx8GezauwIDAQAB
AoGABNdgYYkRP1Do9Qze95SnmM953xeYgRM/oNulZhigtcm6CAsldnLPieSMP4o3
3efeTY6zxksDSRuXZaEdF8u4nn60L2M3oAbL6JPplLgCjRNW2q9mIBQ0rChEFHrU
oBwTcEE/H8RfaAJu7baT4PQXU9jk1DxqGCPiTkNGetGqKAECQQD/yMwprtUSEKA4
SGA5HtCXfZSE6M5698okL2VcmZlzdYFh0wWGNZHgBoR/N3obv7ioqr74UboxM0Yi
psdGE1mhAkEAoq5BnP9QpDZ9eywoXLBSXqR3/WXsYIHgq0ETC5xlquma6qHVPo+B
tSkMxgg8c8fzy5tPSf/AWwwOxSD5AVxu2wJBANkLT0sTgtPobbw0lgoCPug9dJhv
YD5yIwIfgbhY0iBqFlanFKn0rQrXHPlCXwhK4GunL5NQ7livdJUUxkWNR+ECQQCH
zXn+inASNV641Rr4jUSltxxnj48s3R7lN1Sjy7JfY9Wr6t7t87Ruu87q/fMhIBkX
rhYZiwNTvhQSYb0ccsIjAkEA3qDEu1ouTHGAbLguryJ5uw10oEROYuydt55qeT05
IV/wDZ9X6+qJE+BBatO9T+fJGSzKOBCFhmdVdbOLs1t2g==
-----END RSA PRIVATE KEY-----'
PRIVATE_KEY_ID='fizzbuzz'

The variables will be parsed as

PRIVATE_KEY='-----BEGIN RSA PRIVATE KEY-----\n'
PRIVATE_KEY_ID='fizzbuzz'
@techalchemy
Copy link
Member

techalchemy commented Oct 4, 2018

Thanks for the info, can you reference the bug here so we can track it?

Edit just saw that you did already, thanks!

@techalchemy techalchemy added the Type: Vendored Dependencies This issue affects vendored dependencies within pipenv. label Oct 4, 2018
@amancevice
Copy link
Author

Well, there are a couple of closed issues on the repo. It seems like a somewhat contentious topic, so I dunno how much traction my PR will get. Here's the most-recent issue: theskumar/python-dotenv#82

techalchemy added a commit that referenced this issue Jan 22, 2019
- Update gitignore entries for mypy config
- Update release task to add version after bumping but before release
- Fixes #3326 (going forward at least)
- Split out patching from vendoring so it can be done as a separate step
  if needed
- Update patches to account for updated packages
- Fixes #3432
- Fixes #2757
- Fixes #3305
- Fixes #2914
- Fixes #3439
- Fixes #3422
- Fixes #3378
- Fixes #3376
- Fixes #3315

Signed-off-by: Dan Ryan <dan@danryan.co>
@amancevice
Copy link
Author

🎉

@ngoue
Copy link

ngoue commented Dec 9, 2019

Still experiencing this. I'm not sure if something else has changed in python-dotenv and pipenv just needs updated vendor files or if it's something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants