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 +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ IMPORTANT FIXES FOR 1.12.9
22
22
users of unpatched PHP versions (PHP 5.5 <= 5.5.11, PHP 5.4 <= 5.4.27, all
23
23
versions of PHP 5.3 and below). If you use ` Zend_Ldap ` and are on an affected
24
24
version of PHP, we recommend upgrading immediately.
25
+ - ** ZF2014-06** ` Zend_Db_Adapter_Sqlsrv ` had a potential SQL injection
26
+ vulnerability via improperly quoted null bytes. The code has been updated to
27
+ ensure proper quoting and thus remove the security vector. If you are using
28
+ ` Zend_Db_Adapter_Sqlsrv ` and manually quoting values via the adapter, we
29
+ encourage you to upgrade immediately.
25
30
26
31
See http://framework.zend.com/changelog for full details.
27
32
Original file line number Diff line number Diff line change @@ -314,6 +314,7 @@ protected function _quote($value)
314
314
return sprintf ('%F ' , $ value );
315
315
}
316
316
317
+ $ value = addcslashes ($ value , "\000\032" );
317
318
return "' " . str_replace ("' " , "'' " , $ value ) . "' " ;
318
319
}
319
320
Original file line number Diff line number Diff line change @@ -558,4 +558,15 @@ public function getDriver()
558
558
{
559
559
return 'Sqlsrv ' ;
560
560
}
561
+
562
+ /**
563
+ * test that quote() escapes null byte character
564
+ * in a string.
565
+ */
566
+ public function testAdapterQuoteNullByteCharacter ()
567
+ {
568
+ $ string = "1 \0" ;
569
+ $ value = $ this ->_db ->quote ($ string );
570
+ $ this ->assertEquals ("'1 \\000' " , $ value );
571
+ }
561
572
}
You can’t perform that action at this time.
0 commit comments