NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item10399: Tolerate mal-formed regex in OP_match gracefully

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Being Worked On Engine QuerySearch SvenDowideit
KennethLavrsen noted that

  • This works (Sandbox.TestTopic44616:
    %SEARCH{"fields[name~'*' AND value=~'\(']" type="query" web="Tasks"}%
    
  • This does not (See Sandbox.TestTopic44615:
    %SEARCH{"fields[name~'*' AND value=~'(']" type="query" web="Tasks"}%
    , and in fact crashes the wiki hard with a blank screen showing just Unspecified error

-- PaulHarvey - 23 Feb 2011

For the record. This is not what I noted. I notes that valid regexes with () does not work. This has been addressed on a different bug report.

It is a good idea if an invalid regex result in an inline error and not a crash

-- KennethLavrsen - 09 Mar 2011

My misunderstanding had come from my use of fields[] qualification. I hadn't noticed ~ wasn't working for the =FormField=~'' shortcut. Oh well smile

-- PaulHarvey - 09 Mar 2011

bug report good smile started work on it already

-- SvenDowideit - 10 Mar 2011
 

ItemTemplate edit

Summary Tolerate mal-formed regex in OP_match gracefully
ReportedBy PaulHarvey
Codebase 1.1.2, 1.1.1, 1.1.0, 1.1.0 beta1, trunk
SVN Range
AppliesTo Engine
Component QuerySearch
Priority Normal
CurrentState Being Worked On
WaitingFor SvenDowideit
Checkins Foswikirev:11040
TargetRelease patch
ReleasedIn n/a
Topic revision: r5 - 10 Mar 2011, SvenDowideit
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads