* allow hyphens in link names

This commit is contained in:
Manuel Kasper 2011-09-29 14:21:45 +00:00
parent 825a4e5ea7
commit 98804cfd51
2 changed files with 5 additions and 1 deletions

4
README
View File

@ -5,6 +5,10 @@ by Manuel Kasper, Monzoon Networks AG <mkasper@monzoon.net>
Changes
-------
xxx Allow hyphens in link names.
(contributed by Gareth Campling)
v1.34 Fix for NaN detection in rrd-extractstats.pl for
64-bit Perl versions
(contributed by Benjamin Schlageter)

View File

@ -11,7 +11,7 @@ $numtop = 10;
$ascolors = array("D41C0E", "E45605", "FECF12", "2FA11C", "19BB7C", "0A4484", "0A7484", "4CB4C4", "971928", "1f348c");
$link = $_GET['link'];
if (!preg_match("/^[0-9a-zA-Z]+$/", $link))
if (!preg_match("/^[0-9a-zA-Z][0-9a-zA-Z\-]+$/", $link))
die("Invalid link");
/* first step: walk the data for all ASes to determine the top 5 for the given link */