This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,16 @@ Released on MMMMM DD, YYYY.
13
13
IMPORTANT FIXES FOR 1.12.9
14
14
--------------------------
15
15
16
+ ** This release contains security updates:**
17
+
18
+ - ** ZF2014-05:** Due to an issue that existed in PHP's LDAP extension, it is
19
+ possible to perform an unauthenticated simple bind against a LDAP server by
20
+ using a null byte for the password, regardless of whether or not the user
21
+ normally requires a password. We have provided a patch in order to protect
22
+ users of unpatched PHP versions (PHP 5.5 <= 5.5.11, PHP 5.4 <= 5.4.27, all
23
+ versions of PHP 5.3 and below). If you use ` Zend_Ldap ` and are on an affected
24
+ version of PHP, we recommend upgrading immediately.
25
+
16
26
See http://framework.zend.com/changelog for full details.
17
27
18
28
NEW FEATURES
Original file line number Diff line number Diff line change @@ -814,6 +814,10 @@ public function bind($username = null, $password = null)
814
814
{
815
815
$ moreCreds = true ;
816
816
817
+ // Security check: remove null bytes in password
818
+ // @see https://net.educause.edu/ir/library/pdf/csd4875.pdf
819
+ $ password = str_replace ("\0" , '' , $ password );
820
+
817
821
if ($ username === null ) {
818
822
$ username = $ this ->_getUsername ();
819
823
$ password = $ this ->_getPassword ();
Original file line number Diff line number Diff line change @@ -260,4 +260,14 @@ public function testResourceIsAlwaysReturned()
260
260
$ this ->assertTrue (is_resource ($ ldap ->getResource ()));
261
261
$ this ->assertEquals (TESTS_ZEND_LDAP_USERNAME , $ ldap ->getBoundUser ());
262
262
}
263
+
264
+ /**
265
+ * @see https://net.educause.edu/ir/library/pdf/csd4875.pdf
266
+ */
267
+ public function testBindWithNullPassword ()
268
+ {
269
+ $ ldap = new Zend_Ldap ($ this ->_options );
270
+ $ this ->setExpectedException ('Zend_Ldap_Exception ' , 'Invalid credentials ' );
271
+ $ ldap ->bind ($ this ->_altUsername , "\0invalidpassword " );
272
+ }
263
273
}
You can’t perform that action at this time.
0 commit comments