jwt-framework icon indicating copy to clipboard operation
jwt-framework copied to clipboard

Newlines random based on environment

Open jasverix opened this issue 1 year ago • 0 comments

Version(s) affected

4.x

Description

When encoding or decoding RSA keys, the KeyConverter uses the PHP_EOL constant to add newlines. On Linux machines it works nice, but in other environments, it becomes "\r\n" which destroys the keys.

How to reproduce

Try to load a valid key on a Windows machine.

Possible Solution

Replace PHP_EOL with "\n".

Additional Context

No response

jasverix avatar May 10 '24 13:05 jasverix