Author: dblevins
Date: Tue Jun 19 00:23:57 2012
New Revision: 1351543

URL: http://svn.apache.org/viewvc?rev=1351543&view=rev
Log:
more strict matching on groups detainting

Modified:
    openejb/site/trunk/cgi-bin/builds.cgi

Modified: openejb/site/trunk/cgi-bin/builds.cgi
URL: 
http://svn.apache.org/viewvc/openejb/site/trunk/cgi-bin/builds.cgi?rev=1351543&r1=1351542&r2=1351543&view=diff
==============================================================================
--- openejb/site/trunk/cgi-bin/builds.cgi (original)
+++ openejb/site/trunk/cgi-bin/builds.cgi Tue Jun 19 00:23:57 2012
@@ -7,10 +7,8 @@ print "Content-Type: text/html\n\n";
 my $artifact = "/apache-tomee/1.0.1-SNAPSHOT/";
 $artifact = $ENV{PATH_INFO} if $ENV{PATH_INFO};
 
-$artifact = "/$artifact/";
-$artifact =~ s,/+,/,g;
-$artifact =~ s,[^a-zA-Z.[0-9]-],,g;
-$artifact =~ s,\.\./,,g;
+$artifact =~ m,^/?(\w[\w-]+)/(\d[\w\d.-]+)/?$, or die "Detainting regexp 
failed!";
+$artifact = "/$1/$2/";
 
 my $content = `wget -q -O - 
http://repository.apache.org/snapshots/org/apache/openejb$artifact`;
 


Reply via email to