[phpldapadmin] [ phpldapadmin-Bugs-2797836 ] REGEX error in clean_search_vals

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Bugs item #2797836, was opened at 2009-05-28 10:58
Message generated for change (Tracker Item Submitted) made by deligant
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2797836&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: christian deligant (deligant)
Assigned to: Nobody/Anonymous (nobody)
Summary: REGEX error in clean_search_vals

Initial Comment:
If you provide the function  with something like "Medico (di famiglia)", the function fails to escape and returns as if it was already a filter expression

The reason is a missing "^" in the second regex...
ORIGINAL (lines 2852-2853):
	# The string- might be a proper search filter
	if (preg_match('/^\([&\|!]\(/',$val) || (preg_match('/\(([^\(|\)])*\)/',$val))) {

SHOULD BE
	# The string might be a proper search filter
	if (preg_match('/^\([&\|!]\(/',$val) || (preg_match('/^\(([^\(|\)])*\)/',$val))) {

This is the header of the file (version released in the debian Lenny package)
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/functions.php,v 1.303.2.26 2008/01/30 11:17:00 wurley Exp $


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2797836&group_id=61828

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.