msamgan/laravel-env-keys-checker

[Bug]: Multi-line environment vars not supported

Closed this issue · 2 comments

What happened?

I have my Passport keys in my .env files like this:

PASSPORT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----
my key
as a multi-line
string here
-----END PUBLIC KEY-----"

This is not parsed correctly as each line is considered an environment key.

How to reproduce the bug

Just add the environment var from above to you .env file and run the env:keys-check command.

Package Version

v1.3.0

PHP Version

8.3.12

Laravel Version

11.26.0

Which operating systems does with happen with?

macOS

Notes

No response

I guess the GetKey action should check for matching quotation marks?

hey @pelmered, thanks for raising the bug. Multi-line keys are not very common, so it skipped my mind, but definitely, this will be considered in further releases.