web-token/jwt-framework

Newlines random based on environment

Closed this issue · 2 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

Fixed and tagged 3.4.4.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.