From d0ffb4794ad03c537f9de561f7de2953fa933b92 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sun, 8 Feb 2004 11:08:28 +0000 Subject: [PATCH] - Refined the regex to validate the input. --- modules/taxonomy.module | 3 +-- modules/taxonomy/taxonomy.module | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/taxonomy.module b/modules/taxonomy.module index b57be1347a68..68639d4abe0a 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -723,8 +723,7 @@ function taxonomy_page() { $taxonomy->str_tids = check_query(arg(3)); $taxonomy->tids = explode(",", $taxonomy->str_tids); - if (ereg("^[0-9,]+[^,]$", $taxonomy->str_tids)) { - + if (ereg("^([0-9],){0,}[0-9]+$", $taxonomy->str_tids)) { switch (arg(1)) { case "feed": taxonomy_feed($taxonomy); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index b57be1347a68..68639d4abe0a 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -723,8 +723,7 @@ function taxonomy_page() { $taxonomy->str_tids = check_query(arg(3)); $taxonomy->tids = explode(",", $taxonomy->str_tids); - if (ereg("^[0-9,]+[^,]$", $taxonomy->str_tids)) { - + if (ereg("^([0-9],){0,}[0-9]+$", $taxonomy->str_tids)) { switch (arg(1)) { case "feed": taxonomy_feed($taxonomy); -- GitLab