cvs: php-news-web / article.php group.php
| From: | jim winstead | Date: | Wed, 03 Jul 2002 00:00:55 +0000 |
| Subject: | cvs: php-news-web / article.php group.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-11119@lists.php.net to get a copy of this message | ||
jimw Tue Jul 2 20:00:55 2002 EDT
Modified files:
/php-news-web article.php group.php
Log:
plug xss holes
Index: php-news-web/article.php
diff -u php-news-web/article.php:1.12 php-news-web/article.php:1.13
--- php-news-web/article.php:1.12 Wed Jan 23 17:44:08 2002
+++ php-news-web/article.php Tue Jul 2 20:00:55 2002
@@ -10,10 +10,10 @@
if ($group) {
$res = nntp_cmd($s,"GROUP $group",211)
- or die("failed to select group $group");
+ or die("failed to select group .".htmlspecialchars($group));
}
$res = nntp_cmd($s, "ARTICLE $article",220)
- or die("failed to get article $article");
+ or die("failed to get article ".htmlspecialchars($article));
$inheaders = 1; $headers = array();
$charset = "";
Index: php-news-web/group.php
diff -u php-news-web/group.php:1.9 php-news-web/group.php:1.10
--- php-news-web/group.php:1.9 Mon May 20 09:28:58 2002
+++ php-news-web/group.php Tue Jul 2 20:00:55 2002
@@ -9,6 +9,7 @@
$res = nntp_cmd($s,"GROUP $group",211)
or die("failed to get info on group");
list (,$f,$l,$g) = explode(" ", $res);
+$i=(int)$i;
if (!$i || $i > $l - 20 || $i < $f) $i = $l - $f > 20 ? $l - 20 : $f;
$n = min($l+1,$i+20);
$res = nntp_cmd($s,"XOVER $i-$n", 224)