Bug #9121: Remove null padding on stored data
authorimp@lx-soft.com <imp@lx-soft.com>
Fri, 2 Jul 2010 17:44:47 +0000 (11:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 2 Jul 2010 17:44:47 +0000 (11:44 -0600)
framework/Secret/lib/Horde/Secret.php

index 104dd54..6675daf 100644 (file)
@@ -100,7 +100,9 @@ class Horde_Secret
             throw new Horde_Secret_Exception($val);
         }
 
-        return $val;
+        /* Bug #9121: Data may be null padded - need to remove this
+         * padding. */
+        return rtrim($val, "\0");
     }
 
     /**