Skip to content

Commit

Permalink
Item8868: remove support for dangerous configuration option query syn…
Browse files Browse the repository at this point in the history
…tax. We lose the other IF operators as well, but that's not such a big deal

git-svn-id: http://svn.foswiki.org/trunk@7132 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Apr 9, 2010
1 parent 87fe8d0 commit 59291cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions UnitTestContrib/test/unit/Fn_QUERY.pm
Expand Up @@ -40,14 +40,6 @@ sub test_3 {
$this->simpleTest( test => "'A'='A'", expect => 1 );
}

sub test_4 {
my $this = shift;
$this->simpleTest(
test => '$ WIKINAME',
expect => Foswiki::Func::getWikiName( $this->{session}->{user} ),
);
}

sub test_5 {
my $this = shift;
$this->simpleTest(
Expand Down
2 changes: 1 addition & 1 deletion core/data/System/VarQUERY.txt
Expand Up @@ -2,7 +2,7 @@
%META:TOPICPARENT{name="Macros"}%
#VarQUERY
---+++ QUERY -- get the value of meta-data
* Uses the query syntax described in [[Syntax.QuerySearch][QuerySearch]] (and also used for [[System.VarIF][%IF]]) to get information about meta-data.
* Uses the query syntax described in [[Syntax.QuerySearch][QuerySearch]] to get information about meta-data.
* Syntax: =%<nop>QUERY{ "query" [ style="perl|json" ] }%=
* See !QuerySearch for more details of how to write queries
* Examples:
Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki/Macros/QUERY.pm
Expand Up @@ -22,8 +22,8 @@ sub QUERY {
return '';
}
unless ($evalParser) {
require Foswiki::If::Parser;
$evalParser = new Foswiki::If::Parser();
require Foswiki::Query::Parser;
$evalParser = new Foswiki::Query::Parser();
}

$this->{evaluatingEval}->{$expr}++;
Expand Down

0 comments on commit 59291cf

Please sign in to comment.