From be0e7c8498c3f065c9dbdc1300b84d41b2aa6739 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 25 Jul 2019 14:29:54 +0200 Subject: lib/mysql.php: abort_iff_webspider() new - for now only logging the user agent --- buildmaster/build-list-links.php | 2 ++ buildmaster/build-list.php | 2 ++ buildmaster/build-log.php | 2 ++ buildmaster/build-slaves.php | 2 ++ buildmaster/deletion-links.php | 2 ++ buildmaster/dependencies.php | 2 ++ buildmaster/execution-times.php | 2 ++ buildmaster/log.php | 1 + buildmaster/mysql-issues.php | 2 ++ buildmaster/statistics.php | 2 ++ buildmaster/status.php | 2 ++ buildmaster/to-delete.php | 2 ++ 12 files changed, 23 insertions(+) (limited to 'buildmaster') diff --git a/buildmaster/build-list-links.php b/buildmaster/build-list-links.php index e707ba4..10304e4 100644 --- a/buildmaster/build-list-links.php +++ b/buildmaster/build-list-links.php @@ -2,6 +2,8 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $edges = ""; $knots = ""; $filter = "1"; diff --git a/buildmaster/build-list.php b/buildmaster/build-list.php index 2eaf08a..9da07bd 100644 --- a/buildmaster/build-list.php +++ b/buildmaster/build-list.php @@ -5,6 +5,8 @@ require_once BASE . "/lib/helper.php"; require_once BASE . "/lib/mysql.php"; require_once BASE . "/lib/style.php"; +abort_iff_webspider(); + $filter = " WHERE "; if (array_key_exists("invq", $_GET)) diff --git a/buildmaster/build-log.php b/buildmaster/build-log.php index e3fdaef..89655e4 100644 --- a/buildmaster/build-log.php +++ b/buildmaster/build-log.php @@ -5,6 +5,8 @@ require_once BASE . "/lib/http.php"; require_once BASE . "/lib/helper.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $extra_joins = ''; $filter = 'WHERE 1'; diff --git a/buildmaster/build-slaves.php b/buildmaster/build-slaves.php index 7a8a9f2..1285fb8 100644 --- a/buildmaster/build-slaves.php +++ b/buildmaster/build-slaves.php @@ -3,6 +3,8 @@ require_once "../init.php"; require_once BASE . "/lib/style.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $columns = array( "name" => array( "label" => "name", diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index 3a82c4e..f2e1644 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -3,6 +3,8 @@ require_once "../init.php"; require_once BASE . "/lib/helper.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $edges = ""; $knots = ""; diff --git a/buildmaster/dependencies.php b/buildmaster/dependencies.php index c513f2d..336a26f 100644 --- a/buildmaster/dependencies.php +++ b/buildmaster/dependencies.php @@ -2,6 +2,8 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $match = ""; function dependency_arch_join($name) { diff --git a/buildmaster/execution-times.php b/buildmaster/execution-times.php index 3ef4f2a..cbe1cd5 100644 --- a/buildmaster/execution-times.php +++ b/buildmaster/execution-times.php @@ -3,6 +3,8 @@ require_once '../init.php'; require_once BASE . '/lib/mysql.php'; +abort_iff_webspider(); + $result = mysql_run_query( 'SELECT' . ' UNIX_TIMESTAMP(`ssh_log`.`date`) AS `date`,' . diff --git a/buildmaster/log.php b/buildmaster/log.php index 6235b06..0653632 100644 --- a/buildmaster/log.php +++ b/buildmaster/log.php @@ -2,6 +2,7 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); $filter = ""; if (array_key_exists("show", $_GET) && diff --git a/buildmaster/mysql-issues.php b/buildmaster/mysql-issues.php index f84d9f5..f41ab8a 100644 --- a/buildmaster/mysql-issues.php +++ b/buildmaster/mysql-issues.php @@ -2,6 +2,8 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $ignore = ""; if (array_key_exists("ignore-haskell", $_GET)) diff --git a/buildmaster/statistics.php b/buildmaster/statistics.php index f867973..d16263b 100644 --- a/buildmaster/statistics.php +++ b/buildmaster/statistics.php @@ -2,6 +2,8 @@ require_once '../init.php'; require_once BASE . '/lib/mysql.php'; +abort_iff_webspider(); + if (array_key_exists('from', $_GET)) $min_time = 'from_base64("' . base64_encode('-' . $_GET['from']) . '")'; else diff --git a/buildmaster/status.php b/buildmaster/status.php index 05a4455..7dfbc48 100644 --- a/buildmaster/status.php +++ b/buildmaster/status.php @@ -4,6 +4,8 @@ include BASE . "/lib/mysql.php"; include BASE . "/lib/style.php"; include BASE . "/lib/helper.php"; +abort_iff_webspider(); + $result = mysql_run_query( "SELECT MAX(`package_sources`.`commit_time`) AS `last_commit`" . " FROM `package_sources`" diff --git a/buildmaster/to-delete.php b/buildmaster/to-delete.php index 8458c74..f287ce5 100644 --- a/buildmaster/to-delete.php +++ b/buildmaster/to-delete.php @@ -3,6 +3,8 @@ require_once "../init.php"; require_once BASE . "/lib/helper.php"; require_once BASE . "/lib/mysql.php"; +abort_iff_webspider(); + $result = mysql_run_query( "SELECT " . "`repositories`.`name` AS `repo`," . -- cgit v1.2.3-70-g09d2