From 7a02704c0ecdf4373c810760e70a424841619e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20Kentt=C3=A4?= Date: Mon, 11 Jul 2016 12:40:03 +0300 Subject: Require strict base64 in data URI As the tests already show, the data URI wrapper is supposed to fail for corrupt input, but for some reason, one case of invalid input is still allowed to pass?! Strict base64 makes a lot more sense here. Also, Chromium and Firefox fail on invalid base64, so it's a logical choice for PHP as well. --- ext/standard/tests/file/stream_rfc2397_006.phpt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/standard/tests/file') diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt index e6694a2861..f6616a0c88 100644 --- a/ext/standard/tests/file/stream_rfc2397_006.phpt +++ b/ext/standard/tests/file/stream_rfc2397_006.phpt @@ -26,7 +26,9 @@ NULL Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d NULL -string(13) "foobar foobar" + +Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d +bool(false) Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d bool(false) -- cgit v1.2.1