[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-ldap-dev
Subject: Fwd: Re: uninit bug in Net::LDAP
From: Peter Marschall <peter () adpm ! de>
Date: 2004-02-07 17:43:04
Message-ID: 200402071843.04592.peter () adpm ! de
[Download RAW message or body]
Hi Chris,
I know re-posts are bad, but since I did not see any reaction to the attached
post I'll do nonetheless (maybe it got lost due to MyDoom)
May I ask you please to check the attached patch and maybe include it into the
perl-ldap CVS.
Thanks in advance
Peter
---------- Forwarded Message ----------
Subject: Re: uninit bug in Net::LDAP
Date: Saturday 31 January 2004 21:33
From: Peter Marschall <peter@adpm.de>
To: Chris Ridd <chrisridd@mac.com>, Perl-LDAP Mailing List
<perl-ldap@perl.org>
Hi Chris, hi list,
On Wednesday 28 January 2004 22:49, Chris Ridd wrote:
> Filters are mandatory in the protocol, so the search method should return
> an error. (Using some kind of default filter is an interesting idea but
> could be really expensive on some server configurations, so I think an
> error's safer.)
> Good catch, thanks for the bug report.
The patch attached should fix the problem.
It sets the error string and returns undef on undefined filters.
Peter
--
Peter Marschall
eMail: peter@adpm.de
-------------------------------------------------------
--
Peter Marschall
eMail: peter@adpm.de
["perl-ldap-0.31-Filter.patch" (text/x-diff)]
# patch to check that filter is defined in Net::LDAP::Filter->parse
# created by Peter Marschall <peter@adpm.de>
--- lib/Net/LDAP/Filter.pm
+++ lib/Net/LDAP/Filter.pm 2004-01-31 21:17:09.000000000 +0100
@@ -159,6 +159,12 @@
undef $ErrStr;
+ # a filter is required
+ if (!defined $filter) {
+ $ErrStr = "Undefined filter";
+ return undef;
+ }
+
# Algorithm depends on /^\(/;
$filter =~ s/^\s*//;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic