Skip to content

Commit

Permalink
Item9657: Remove one smell. Easy
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@9020 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Sep 12, 2010
1 parent 99800df commit 6e7cbfb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/lib/Foswiki/UI/Rest.pm
Expand Up @@ -73,9 +73,7 @@ sub rest {
# the path_info, but we *can* persuade Foswiki to ignore it.
my $topic = $req->param('topic');
if ($topic) {

# SMELL: excess brackets in RE?
unless ( $topic =~ /((?:.*[\.\/])+)(.*)/ ) {
unless ( $topic =~ /\.|\// ) {
$res->header( -type => 'text/html', -status => '400' );
$err = 'ERROR: (400) Invalid REST invocation'
. " - Invalid topic parameter $topic\n";
Expand Down

0 comments on commit 6e7cbfb

Please sign in to comment.