Item10585: topiclist parameter validation cannot handle subwebs and topic names with hyphens.

Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: minor
Applies To: Extension
Component: PublishPlugin
Reported By: DiabJerius
Waiting For:
Last Change By: CrawfordCurrie
Version 2.20

I'm generating a list of topics from a search across multiple subwebs. The list returned by the search looks sort of like this:

Public.3C273-Wings-2001-01-30, Public/SAOTrace.Make-world, Public/SAOTrace.ManualInstall

This is being passed to the "topiclist" parameter. Unfortunately the validation fails because the regexp in _validateList in doesn't allow the "-" or "/" characters:

     68 sub _validateList {
     69     my $v = shift;
     70     if ($v =~ /^([\w,. ]*)$/ ) {
     71         return $1;
     72     }
     73     my $k = shift;
     74     die "Invalid $k: '$v'";
     75 }

It should be able to handle any permitted topic name.

-- DiabJerius - 02 Apr 2011

I've attached a patch which creates a new _validateTopicList function to handle this problem

-- DiabJerius - 02 Apr 2011

Came to this via another path and ended up with a slightly different fix.

-- CrawfordCurrie - 25 May 2011

ItemTemplate edit

Summary topiclist parameter validation cannot handle subwebs and topic names with hyphens.
ReportedBy DiabJerius
Codebase 1.1.2
SVN Range
AppliesTo Extension
Component PublishPlugin
Priority Urgent
CurrentState Closed
Checkins PublishPlugin:374286c93442
TargetRelease minor
ReleasedIn n/a
Topic attachments
I Attachment Action Size Date Who Comment
topiclist.patchpatch topiclist.patch manage 877 bytes 02 Apr 2011 - 06:00 DiabJerius add _validateTopicList validation routine
Topic revision: r5 - 25 May 2011, CrawfordCurrie - This page was cached on 24 Feb 2018 - 07:13.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License