Fix #72152: base64_decode should reject NUL in strict mode#1917
Fix #72152: base64_decode should reject NUL in strict mode#1917Metabolix wants to merge 1 commit intophp:PHP-5.6from
Conversation
|
Shouldn't we just drop the |
031ca85 to
e6d7c3b
Compare
|
That's true, I've updated the PR. |
|
With this change ext/standard/tests/url/bug55273.phpt on Travis fails with This is probably related to the contents in the |
|
Whoops. Would you prefer going back to my original fix or revising the whole thing? |
|
The aforementioned padding branch doesn't even handle the length correctly but instead loops through all whitespace, possibly causing past-the-end access. I opted for the rewrite, which actually revealed various other problems. I'll start a discussion on the mailing list, let's see how it goes. |
|
Submitted another approach as PR 1923. |
https://bugs.php.net/bug.php?id=72152
The documentation for
base64_decodeparameter$strictsays, "Returns FALSE if input contains character from outside the base64 alphabet." This should apply to NUL bytes as well.