aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorlouise <louise>2009-11-30 16:12:29 +0000
committerlouise <louise>2009-11-30 16:12:29 +0000
commitd5bc89071ecc4d0ffffefea6c845caf4b8f53487 (patch)
tree43ac70240b4f16c8c166af4982e05e988ebe34be /web
parent7b7da57cb50e6389c5608f11ee4138233d570007 (diff)
Returning 404 for bad problem id
Diffstat (limited to 'web')
-rwxr-xr-xweb/rss.cgi7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/rss.cgi b/web/rss.cgi
index 8dd01e40f..be77a78a5 100755
--- a/web/rss.cgi
+++ b/web/rss.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: rss.cgi,v 1.36 2009-11-30 15:32:39 louise Exp $
+# $Id: rss.cgi,v 1.37 2009-11-30 16:12:29 louise Exp $
use strict;
use Error qw(:try);
@@ -29,7 +29,10 @@ sub main {
} elsif ($type eq 'new_updates') {
my $id = $q->param('id');
my $problem = Problems::fetch_problem($id);
- die 'Unknown problem' unless $problem;
+ if (!$problem) {
+ print $q->header(-status=>'404 Not Found',-type=>'text/html');
+ return;
+ }
my $qs = 'report/' . $id;
$out = mySociety::Alert::generate_rss($type, $xsl, $qs, [$id], undef, $cobrand, $q);
} elsif ($type eq 'new_problems' || $type eq 'new_fixed_problems') {