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

urlSafeB64Encode function mistake #301

Closed
nasaorc opened this issue Jan 10, 2014 · 1 comment
Closed

urlSafeB64Encode function mistake #301

nasaorc opened this issue Jan 10, 2014 · 1 comment

Comments

@nasaorc
Copy link

nasaorc commented Jan 10, 2014

in file Jwt.php

$b64 = str_replace(array('+', '/', '\r', '\n', '='),
                array('-', '_'),
                $b64);

the '\r' and '\n' won't match new lines

single quotation mark will match \n as string(2) '\n'

to match new line should use "\n" instead

@bshaffer
Copy link
Owner

bshaffer commented Apr 5, 2014

Thank you for catching this!

phindmarsh pushed a commit to phindmarsh/oauth2-server-php that referenced this issue Apr 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants