mehrancodes / laravel-harbor

a cli tool to Quickly create on-demand preview environment for your app on Laravel Forge.
https://www.laravel-harbor.com
MIT License
75 stars 7 forks source link

Veyoze converts "+" in env keys to " " #57

Closed gbradley closed 8 months ago

gbradley commented 8 months ago

I'm storing my ENV variables in a GitHub secret and referencing them via FORGE_ENV_KEYS. I noticed one of my base64 encoded strings has had its + characters replaced with a space :

Original:

MY_SECRET="base64:B5+B6voa8tXtkUtkvb+VaV8sd2nvu9y80QmTnJ5CveQ="

Results in

MY_SECRET="base64:B5 B6voa8tXtkUtkvb VaV8sd2nvu9y80QmTnJ5CveQ="

Afaik a + character is valid within base64 encoding.

mehrancodes commented 8 months ago

Interesting. Looks like the issue comes from the parse_str method I've used to convert a key/value string variable to array.

It's on my list to check out. Thank you for investing time in Veyoze!

gbradley commented 8 months ago

Thanks! I wasn't sure if this was going to be a Veyoze / Forge SDK issue, did have a quick look around but didn't notice that method call.

Spent some time getting it up and running on a client server today, works really well so far!

mehrancodes commented 8 months ago

Found a quick but secure solution ✅. I'll make a PR once I got added some test assertions.

mehrancodes commented 8 months ago

Addressed this issue in this release: https://github.com/mehrancodes/veyoze/releases/tag/v0.1.6

Feel free to drop a comment if you still run into any problems with it.

I'd love any feedback on the documentation. Could you tell me if it was easy to understand the setup?