From ed9dc10c820270402c3c435ec097137e9d541f9a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 8 Jul 2019 13:21:05 +0200 Subject: buildmaster/build-log.php: throw 404 on unavailable log --- buildmaster/build-log.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'buildmaster/build-log.php') diff --git a/buildmaster/build-log.php b/buildmaster/build-log.php index e2a2fc8..e02e121 100644 --- a/buildmaster/build-log.php +++ b/buildmaster/build-log.php @@ -27,6 +27,9 @@ $result = mysql_run_query( ' LIMIT 1' ); +if ($result -> num_rows != 1) + throw_http_error(404, 'Not Found', 'No logs found for this package.'); + $result = $result -> fetch_assoc(); redirect_temporarily('https://buildmaster.archlinux32.org/build-logs/error/' . $result['log_file']); -- cgit v1.2.3-70-g09d2