Bug #75910 [NEW]: convert.base64-encode omits padding bytes

From: Date: Fri, 02 Feb 2018 22:09:26 +0000
Subject: Bug #75910 [NEW]: convert.base64-encode omits padding bytes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213791@lists.php.net to get a copy of this message
From:             me at levisflorian dot name
Operating system: macOS 10.13.3 (via brew)
PHP version:      7.2.2
Package:          Filter related
Bug Type:         Bug
Bug description:convert.base64-encode omits padding bytes

Description:
------------
When using temp stream, filter convert.base64-encode omits padding
bytes.
Actually on php 7.2.1 (instead of 7.2.2 selected above) - multiple php
versions installed with brew.sh

Found a similar bug on old php version #68532
(https://bugs.php.net/bug.php?id=68532)

Test script:
---------------
Please find test script (based on #68532) here:
https://gist.github.com/Gounlaf/c54dce4f843e89d4f5814eb7790cdcd3

Expected result:
----------------
encode - low-level - memory = dGVzdA==
decode - low-level - memory = test
encode - low-level - temp = dGVzdA==
decode - low-level - temp = test


Actual result:
--------------
encode - low-level - memory = dGVzdA==
decode - low-level - memory = test
encode - low-level - temp = dGVz
decode - low-level - temp = test


-- 
Edit bug report at https://bugs.php.net/bug.php?id=75910&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=75910&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=75910&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=75910&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=75910&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=75910&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=75910&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=75910&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=75910&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=75910&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=75910&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=75910&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=75910&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=75910&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75910&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=75910&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=75910&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=75910&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75910&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=75910&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=75910&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#213791) next »