Foswiki on GitHub is open for business! Next release meeting: Monday October 13, 1300Z

Item10269: PurePerl search for form.name in a subweb (using the / web separator) over-escapes and so give no results

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine    
Paul found it in MongoDB query when using the slower regex code, but I've confirmed the same issue exists for the PurePerl regex engine.

so

SEARCH{"form.name='TaxonProfile/Builder.TermForm'" results in qr/(?-xism:%META:FORM{.*\\bname=\\"TaxonProfile\\\\\\/Builder\\.TermForm\\")/

which is about a bajillion too many =/='s

this bug probably covers all versions :/

I'll add some unit testage for it.

-- SvenDowideit - 19 Jan 2011

it seems there is some old code in PurePerl that i don't grok, and doesn't seem to have aunit test covering for.

<SvenDowideit>               # Escape /, used as delimiter. This also blocks any attempt to use
<SvenDowideit>               # the search string to execute programs on the server.
<SvenDowideit>                 $raw_searchString =~ s!/!\\/!g;

the regex fails to escape the /, instead adding an escaped \

i'll commit removing on \ and a unit test for this task and we'll see if anyone notices anything.

-- SvenDowideit - 19 Jan 2011
 

ItemTemplate edit

Summary PurePerl search for form.name in a subweb (using the / web separator) over-escapes and so give no results
ReportedBy SvenDowideit
Codebase 1.1.2, trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:4baea7222ea3 MongoDBPlugin:5a49945bb0e0 distro:0299a44581dd
TargetRelease patch
ReleasedIn 1.1.3
Topic revision: r6 - 16 Apr 2011, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License