Bug #19364 [Opn]: Net_LDAP2_Filter parse accepts invalid filter
| From: | beni@php.net | Date: | Thu, 12 Apr 2012 07:19:35 +0000 |
| Subject: | Bug #19364 [Opn]: Net_LDAP2_Filter parse accepts invalid filter | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8553@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19364&edit=1
ID: 19364
Updated by: beni@php.net
Reported By: bob at mroczka dot com
Summary: Net_LDAP2_Filter parse accepts invalid filter
Status: Open
Type: Bug
Package: Net_LDAP2
Operating System: ubuntu 11.10
Package Version: 2.0.12
PHP Version: 5.4.0
Roadmap Versions:
New Comment:
I added your test case to the unit test scripts.
Previous Comments:
------------------------------------------------------------------------
[2012-04-01 23:18:38] rmroczk
Description:
------------
a filter with trailing extra parens parses successfully
Test script:
---------------
110 $parsed4 =
Net_LDAP2_Filter::parse('(|(invalid-because-too-many-close-parens=x)(a=c)))');
111 $this->assertInstanceOf('PEAR_Error', $parsed4);
Expected result:
----------------
expect filter to return a pear_error object
Actual result:
--------------
phpunit Net_LDAP2_FilterTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.
.FF...
Time: 0 seconds, Memory: 3.75Mb
There were 2 failures:
1) Net_LDAP2_FilterTest::testParse
Failed asserting that Net_LDAP2_Filter Object (...) is an instance of
class "PEAR_Error".
/home/xxx/php/Net_LDAP2-2.0.12/tests/Net_LDAP2_FilterTest.php:111
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19364&edit=1