From e4d60297fd043d8d4f2ecbbd930dc664601cecb5 Mon Sep 17 00:00:00 2001 From: Mark Brugnoli-Vinten Date: Wed, 4 Jan 2023 13:06:23 +0000 Subject: [PATCH] Update copyright year for 2023 --- .github/FUNDING.yml | 21 ++++ .github/ISSUE_TEMPLATE/bug_report.md | 5 + .github/ISSUE_TEMPLATE/feature_request.md | 6 ++ .github/workflows/oldissues.yml | 21 ++++ .github/workflows/syntax.yml | 21 ++++ .gitignore | 22 +++- .mdl_style.rb | 21 ++++ .mdlrc | 21 ++++ .travis.yml | 78 -------------- CHANGELOG | 3 + SECURITY.md | 5 +- cache/boost/.htaccess | 21 ++++ cache/boost/index.php | 22 ++++ cache/index.php | 22 ++++ cache/mibcache/.htaccess | 21 ++++ cache/mibcache/index.php | 22 ++++ cache/realtime/.htaccess | 21 ++++ cache/realtime/index.php | 22 ++++ cache/spikekill/.htaccess | 21 ++++ cache/spikekill/index.php | 22 ++++ cli/.htaccess | 21 ++++ cli/index.php | 40 +++---- composer.json | 22 ++++ composer.lock | 22 ++++ formats/cacti_group.format | 2 +- formats/cacti_group_dark.format | 2 +- formats/cacti_monitor.format | 2 +- formats/index.php | 40 +++---- images/index.php | 40 +++---- include/config.php.dist | 2 +- include/content/README | 21 ++++ include/content/basic-example.html | 23 ++++ include/content/iframe-example.html | 23 ++++ include/content/index.php | 40 +++---- include/content/php-example.html | 23 ++++ include/fa/css/index.php | 22 ++++ include/fa/index.php | 22 ++++ include/fa/js/index.php | 22 ++++ include/fa/less/index.php | 22 ++++ include/fa/metadata/index.php | 22 ++++ include/fa/scss/index.php | 22 ++++ include/fa/sprites/index.php | 22 ++++ include/fa/svgs/brands/index.php | 22 ++++ include/fa/svgs/regular/index.php | 22 ++++ include/fa/svgs/solid/index.php | 22 ++++ include/fa/webfonts/index.php | 22 ++++ include/index.php | 40 +++---- include/js/LC_MESSAGES/index.php | 22 ++++ include/js/index.php | 22 ++++ include/themes/cacti/main.css | 23 ++++ include/themes/carrot/main.css | 23 ++++ include/themes/classic/default/index.php | 40 +++---- include/themes/classic/images/index.php | 40 +++---- include/themes/classic/index.php | 40 +++---- include/themes/classic/main.css | 23 ++++ include/themes/dark/default/index.php | 40 +++---- include/themes/dark/images/index.php | 40 +++---- include/themes/dark/index.php | 40 +++---- include/themes/dark/main.css | 23 ++++ include/themes/hollyberry/main.css | 23 ++++ include/themes/index.php | 40 +++---- include/themes/midwinter/default/index.php | 40 +++---- include/themes/midwinter/images/index.php | 40 +++---- include/themes/midwinter/index.php | 40 +++---- include/themes/midwinter/main.css | 23 ++++ .../midwinter/vendor/ua-parser/license.md | 2 +- .../midwinter/vendor/ua-parser/ua-parser.js | 2 +- include/themes/modern/default/index.php | 40 +++---- include/themes/modern/images/index.php | 40 +++---- include/themes/modern/index.php | 40 +++---- include/themes/modern/main.css | 23 ++++ include/themes/paper-plane/default/index.php | 40 +++---- include/themes/paper-plane/images/index.php | 40 +++---- include/themes/paper-plane/index.php | 40 +++---- include/themes/paper-plane/main.css | 23 ++++ include/themes/paw/default/index.php | 40 +++---- include/themes/paw/images/index.php | 40 +++---- include/themes/paw/index.php | 40 +++---- include/themes/paw/main.css | 23 ++++ include/themes/raspberry/main.css | 23 ++++ include/themes/sunrise/default/index.php | 40 +++---- include/themes/sunrise/images/index.php | 40 +++---- include/themes/sunrise/index.php | 40 +++---- include/themes/sunrise/main.css | 23 ++++ include/vendor/csrf/index.php | 22 ++++ include/vendor/flag-icon-css/assets/index.php | 22 ++++ include/vendor/flag-icon-css/css/index.php | 22 ++++ include/vendor/flag-icon-css/index.php | 22 ++++ include/vendor/flag-icon-css/sass/index.php | 22 ++++ include/vendor/index.php | 22 ++++ include/vendor/phpgettext/index.php | 22 ++++ include/vendor/phpmailer/index.php | 22 ++++ include/vendor/phpmailer/language/index.php | 22 ++++ include/vendor/phpmailer/src/index.php | 22 ++++ include/vendor/phpseclib/Crypt/index.php | 22 ++++ include/vendor/phpseclib/File/ASN1/index.php | 22 ++++ include/vendor/phpseclib/File/index.php | 22 ++++ include/vendor/phpseclib/Math/index.php | 22 ++++ include/vendor/phpseclib/Net/SFTP/index.php | 22 ++++ include/vendor/phpseclib/Net/index.php | 22 ++++ .../phpseclib/System/SSH/Agent/index.php | 22 ++++ include/vendor/phpseclib/System/SSH/index.php | 22 ++++ include/vendor/phpseclib/System/index.php | 22 ++++ include/vendor/phpseclib/index.php | 22 ++++ include/vendor/phpsnmp/index.php | 22 ++++ install/install.css | 23 ++++ install/upgrades/index.php | 40 +++---- lib/index.php | 40 +++---- locales/LC_MESSAGES/index.php | 40 +++---- locales/index.php | 40 +++---- locales/po/de-DE.po | 2 +- locales/po/index.php | 40 +++---- locales/po/ko-KR.po | 2 +- log/.htaccess | 21 ++++ log/index.php | 40 +++---- mibs/.htaccess | 41 +++++-- mibs/CACTI-BOOST-MIB | 2 +- mibs/CACTI-MIB | 2 +- mibs/CACTI-SNMPAGENT-MIB | 2 +- mibs/index.php | 40 +++---- plugins/index.php | 40 +++---- resource/index.php | 40 +++---- resource/script_queries/index.php | 40 +++---- resource/script_server/index.php | 40 +++---- resource/snmp_queries/index.php | 40 +++---- rra/.htaccess | 21 ++++ run | 23 ++++ scripts/.htaccess | 41 +++++-- scripts/cacti_user_stats.php | 2 +- scripts/diskfree.sh | 2 +- scripts/index.php | 40 +++---- scripts/query_host_cpu.php | 2 +- scripts/query_host_partitions.php | 2 +- scripts/ss_count_oids.php | 2 +- scripts/ss_cpoller.php | 2 +- scripts/ss_fping.php | 2 +- scripts/ss_gexport.php | 2 +- scripts/ss_host_cpu.php | 2 +- scripts/ss_host_disk.php | 2 +- scripts/ss_hstats.php | 2 +- scripts/ss_net_snmp_disk_bytes.php | 2 +- scripts/ss_net_snmp_disk_io.php | 2 +- scripts/ss_poller.php | 2 +- scripts/ss_sql.php | 2 +- scripts/ss_webseer.php | 2 +- service/cactid.service | 21 ++++ service/index.php | 40 +++---- src-check | 2 +- src-fixer | 2 +- src-lint | 2 +- tests/tools/copyright_year.sh | 86 ++++++++++----- tests/tools/travis-ci-apache | 102 +++++++++--------- 152 files changed, 2627 insertions(+), 1026 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 8c227658da..6f69e82536 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + # These are supported funding model platforms github: [cacti, netniV] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 15e19ed3b9..f3dfabae7c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,6 +6,11 @@ labels: 'bug,unverified' assignees: '' --- + # Describe the bug A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 0763053971..043f232fdf 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -6,6 +6,12 @@ labels: 'enhancement' assignees: '' --- + + # Feature Request ## Is your feature request related to a problem? Please describe diff --git a/.github/workflows/oldissues.yml b/.github/workflows/oldissues.yml index c3b1b8222f..400baa1d54 100644 --- a/.github/workflows/oldissues.yml +++ b/.github/workflows/oldissues.yml @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + name: "Maintain old issues" on: diff --git a/.github/workflows/syntax.yml b/.github/workflows/syntax.yml index 488a2f599d..93dd3f6ed1 100644 --- a/.github/workflows/syntax.yml +++ b/.github/workflows/syntax.yml @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + name: Cacti Commit Audit on: diff --git a/.gitignore b/.gitignore index 9c5936420b..a815a1192c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,23 @@ -################################################################## +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ # # For any folder that ignores all subcontent (/**), you # must MANUALLY use 'git add' to include a file as source @@ -19,7 +38,6 @@ # maintainable and as such are prefixed with an exclamation # mark (!include/theme/mytheme = do not ignore mytheme) # -################################################################## # Ignore vim swap files *.swp diff --git a/.mdl_style.rb b/.mdl_style.rb index 07680c881d..17ad7feb2f 100644 --- a/.mdl_style.rb +++ b/.mdl_style.rb @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + # customize style guide all rule "MD010", code_blocks: false diff --git a/.mdlrc b/.mdlrc index 2f92946d65..3bec0e4225 100644 --- a/.mdlrc +++ b/.mdlrc @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + # mdl cli configuration style ".mdl_style.rb" verbose false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e79b1b474a..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -language: php - -services: - - mysql - -matrix: - include: - - php: 7.2 - dist: bionic - - php: 7.3 - dist: bionic - - php: 7.4 - dist: bionic - - php: 8.0 - dist: bionic - fast_finish: true - -before_install: - # run syntax check - - if find . -name '*.php' -exec php -l {} 2>&1 \; | grep -iv 'no syntax errors detected'; then exit 1; fi - # obtain keys for Ubuntu - - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13 6B05F25D762E3157 - # get latest updates - - sudo apt-get update > /dev/null - -install: - # setup link for php legacy - - sudo ln -s ~/.phpenv/versions/$(phpenv version-name)/bin/php /bin/php - # install apache web server - - sudo apt-get install apache2 php-fpm php-mysql php-gd php-ldap php-gmp php-xml php-mbstring rrdtool snmp libapache2-mod-php - - sudo a2enmod proxy_fcgi setenvif actions alias - - sudo find /etc/apache2 - # configure apache virtual hosts - - sudo cp -f tests/tools/cacti.conf /etc/apache2/sites-available/000-default.conf - # set some required variables - - echo 'cgi.fix_pathinfo = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo 'date.timezone = "America/New_York"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - # copy the Cacti website to the correct direcotry - - sudo cp -rp /home/travis/build/Cacti/cacti /var/www/html/ - # change ownership on the Cacti directory - - sudo chown -R www-data:www-data /home/travis/build/Cacti/cacti - - sudo chown -R www-data:www-data /var/www/html/cacti - # make the directory more open for our tests - - sudo chmod -R 777 /home/travis/build/Cacti/cacti - # enable php-fpm - - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf - - sudo sed -i -e 's,nobody,www-data,g' ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/*.conf - - sudo grep nobody ~/.phpenv/versions/$(phpenv version-name)/etc/ -R - # restart apache - - sudo service apache2 restart - # start php-fpm - - sudo ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm - -before_script: - - mysql -e 'CREATE DATABASE cacti;' - - mysql -e "CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'cactiuser';" - - mysql -e "GRANT ALL PRIVILEGES ON cacti.* TO 'cactiuser'@'localhost';" - - mysql -e "FLUSH PRIVILEGES;" - - mysql cacti < cacti.sql - - mysql -e "INSERT INTO settings (name, value) VALUES ('path_php_binary', '/bin/php')" cacti - - sudo cp -p include/config.php.dist include/config.php - - sudo cp -p include/config.php.dist /var/www/html/cacti/include/config.php - -script: - - cd /var/www/html/cacti && sudo php tests/tools/check_install_code.php - - cd /var/www/html/cacti && sudo bash tests/tools/check_cli_version.sh - - cd /var/www/html/cacti && sudo php cli/install_cacti.php --accept-eula --install --force - - cd /var/www/html/cacti && sudo bash tests/tools/check_all_pages.sh - - cd /var/www/html/cacti && sudo cat /var/www/html/cacti/log/cacti.log - -notifications: - email: - on_success: change - on_failure: always - recipients: - - developers@cacti.net - slack: - secure: ZY2XMrAUZO0UbZY0MvRd+sD60+fnvluUVm5kxXII/+waDpEutLmWnNclJo+96KI0zXZwsYcdahmHc4lnNiJhZSGcZN3QWp/bAophgT5b3ly4k2HzyMcG39pK9v1ue2tws4yB9OPDMcTyq7XPEcWxQT3q7Ca7hAYVCOZSnAt17OTe6HgasjvJtekDog+dK0iI3TB9BIrazWw4e2eoFpnVnPtTPo8qI0uh3Aihcfg12ETzssLD4hvyx6eBmaQBHn0jhvuw3AfzD82T4g5MHaLrGGz3q8tD+iZPGEIp4XBxeDtFkYx+MdY6IFWlYXa0mCVE1H7ChQjk3VMhHGxZMFzUOyxn61CGPJLGknn98qnrgj7bXRq073RlzirnyvRmxilFeJlXNM3KiVie5e3Abl7u5REQMfvs8slETLE7bQ7MJwyF6wWamaZWzoeIGS+ZEdEAdZK0LoTApHsk4rh1ciJZP6ECn6S+1bkAfRDPoyo9LOjqL32oSl6S3+/hGVHTJr1e9fEX+iwjLwA6w3JmbvhfGY/eLudRz+QqY0MlRiBp9bdnkLoneS6gmKhz5n6bzaDZxZ4xmLWY4aSX1rLbOyJZAss2m0vvaxg7QnJ6LjHDWeQUHcDLsklYBAqK8IAzBEDHzOic+9GOvtWyPWXBktR+8bNn+C0oFrHCykFo8dDv8Nc= diff --git a/CHANGELOG b/CHANGELOG index 6428f436dc..81fc30b000 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3778,3 +3778,6 @@ Cacti CHANGELOG 0.5 -initial release + +----------------------------------------------- +Copyright (c) 2004-2023 - The Cacti Group, Inc. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index 44e18b65ce..286aef2780 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,6 +12,9 @@ ## Reporting a Vulnerability -Please use either GitHub's private vulnerability reporting or send an email to developers@cacti.net. We will aim to respond within a few days and accept any PoC's that demonstrate how to test for the vulnerability. +Please use either GitHub's private vulnerability reporting or send an email to developers@cacti.net. We will aim to respond within a few days and accept any PoC's that demonstrate how to test for the vulnerability. We wlil remove an PoC from published advisory's were possible and will advise to this effect when doing so. + +--- +Copyright (c) 2004-2023 - The Cacti Group, Inc. diff --git a/cache/boost/.htaccess b/cache/boost/.htaccess index 18532a25d6..ba1c96efec 100644 --- a/cache/boost/.htaccess +++ b/cache/boost/.htaccess @@ -1,3 +1,24 @@ +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + # Apache 2.4 Require all denied diff --git a/cache/boost/index.php b/cache/boost/index.php index 4e67c6bfc9..94874f99aa 100644 --- a/cache/boost/index.php +++ b/cache/boost/index.php @@ -1,3 +1,25 @@ Require all denied diff --git a/cache/mibcache/index.php b/cache/mibcache/index.php index a54685a2ec..5ad1cf8389 100644 --- a/cache/mibcache/index.php +++ b/cache/mibcache/index.php @@ -1,3 +1,25 @@ Require all denied diff --git a/cache/realtime/index.php b/cache/realtime/index.php index 4e67c6bfc9..94874f99aa 100644 --- a/cache/realtime/index.php +++ b/cache/realtime/index.php @@ -1,3 +1,25 @@ Require all denied diff --git a/cache/spikekill/index.php b/cache/spikekill/index.php index 4e67c6bfc9..94874f99aa 100644 --- a/cache/spikekill/index.php +++ b/cache/spikekill/index.php @@ -1,3 +1,25 @@ Require all denied diff --git a/cli/index.php b/cli/index.php index 74b8c3c44d..94874f99aa 100644 --- a/cli/index.php +++ b/cli/index.php @@ -1,25 +1,25 @@ -Copyright © 2004-2022 - The Cacti Group +Copyright © 2004-2023 - The Cacti Group diff --git a/formats/cacti_group_dark.format b/formats/cacti_group_dark.format index c94d9b2a95..d39d2a4af7 100644 --- a/formats/cacti_group_dark.format +++ b/formats/cacti_group_dark.format @@ -121,7 +121,7 @@ table { -Copyright © 2004-2022 - The Cacti Group +Copyright © 2004-2023 - The Cacti Group diff --git a/formats/cacti_monitor.format b/formats/cacti_monitor.format index 5c8f2487fd..521677a547 100644 --- a/formats/cacti_monitor.format +++ b/formats/cacti_monitor.format @@ -111,6 +111,6 @@ h2 {
- + diff --git a/formats/index.php b/formats/index.php index 74b8c3c44d..94874f99aa 100644 --- a/formats/index.php +++ b/formats/index.php @@ -1,25 +1,25 @@ +

This is the content of my page

This can be any HTML

diff --git a/include/content/iframe-example.html b/include/content/iframe-example.html index 9b84adb0bb..4dab7f116e 100644 --- a/include/content/iframe-example.html +++ b/include/content/iframe-example.html @@ -1,3 +1,26 @@ + +

A quick example of using iframes to embed another site (e.g. your Nagios, or some other app?). IFRAME docs

diff --git a/include/content/index.php b/include/content/index.php index 74b8c3c44d..94874f99aa 100644 --- a/include/content/index.php +++ b/include/content/index.php @@ -1,25 +1,25 @@ + Because it's being included via PHP, you can use PHP code too, which could contact a database, or cacti functions. Here's the current time, courtesy of PHP: diff --git a/include/fa/css/index.php b/include/fa/css/index.php index 4e67c6bfc9..94874f99aa 100644 --- a/include/fa/css/index.php +++ b/include/fa/css/index.php @@ -1,3 +1,25 @@ > +Copyright (c) 2004-2023 Faisal Salman <> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/include/themes/midwinter/vendor/ua-parser/ua-parser.js b/include/themes/midwinter/vendor/ua-parser/ua-parser.js index 216aac0220..9cd6f4564f 100755 --- a/include/themes/midwinter/vendor/ua-parser/ua-parser.js +++ b/include/themes/midwinter/vendor/ua-parser/ua-parser.js @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// /* UAParser.js v1.0.2 - Copyright © 2012-2021 Faisal Salman + Copyright © 2004-2023 Faisal Salman MIT License *//* Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment. diff --git a/include/themes/modern/default/index.php b/include/themes/modern/default/index.php index 74b8c3c44d..94874f99aa 100644 --- a/include/themes/modern/default/index.php +++ b/include/themes/modern/default/index.php @@ -1,25 +1,25 @@ Require all denied diff --git a/log/index.php b/log/index.php index 74b8c3c44d..94874f99aa 100644 --- a/log/index.php +++ b/log/index.php @@ -1,25 +1,25 @@ - Require all denied -
- -# Apache 2.2 - - Order Allow,Deny - Deny from all - +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + +# Apache 2.4 + + Require all denied + + +# Apache 2.2 + + Order Allow,Deny + Deny from all + diff --git a/mibs/CACTI-BOOST-MIB b/mibs/CACTI-BOOST-MIB index 994b7b914f..09e8fa2977 100644 --- a/mibs/CACTI-BOOST-MIB +++ b/mibs/CACTI-BOOST-MIB @@ -3,7 +3,7 @@ -- -- Jan 2015, Andreas Braun (aka browniebraun) -- --- Copyright (c) 2004-2021 by The Cacti Group +-- Copyright (c) 2004-2023 by The Cacti Group -- All rights reserved. -- -- ***************************************************************** diff --git a/mibs/CACTI-MIB b/mibs/CACTI-MIB index 955e90000b..dcd7b09193 100644 --- a/mibs/CACTI-MIB +++ b/mibs/CACTI-MIB @@ -3,7 +3,7 @@ -- -- Dec 2012, Andreas Braun (aka browniebraun) -- --- Copyright (c) 2004-2021 by The Cacti Group +-- Copyright (c) 2004-2023 by The Cacti Group -- All rights reserved. -- -- ***************************************************************** diff --git a/mibs/CACTI-SNMPAGENT-MIB b/mibs/CACTI-SNMPAGENT-MIB index bf3647c0c2..2888e6be62 100644 --- a/mibs/CACTI-SNMPAGENT-MIB +++ b/mibs/CACTI-SNMPAGENT-MIB @@ -3,7 +3,7 @@ -- -- NOV 2013, Andreas Braun (aka browniebraun) -- --- Copyright (c) 2004-2021 by The Cacti Group +-- Copyright (c) 2004-2023 by The Cacti Group -- All rights reserved. -- -- ***************************************************************** diff --git a/mibs/index.php b/mibs/index.php index 74b8c3c44d..94874f99aa 100644 --- a/mibs/index.php +++ b/mibs/index.php @@ -1,25 +1,25 @@ Require all denied diff --git a/run b/run index 87108d4b5d..6d23604f45 100755 --- a/run +++ b/run @@ -1,4 +1,27 @@ #!/usr/bin/env bash +# +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + + SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SUDO_USR=www-data diff --git a/scripts/.htaccess b/scripts/.htaccess index 533cef6751..ba1c96efec 100644 --- a/scripts/.htaccess +++ b/scripts/.htaccess @@ -1,10 +1,31 @@ -# Apache 2.4 - - Require all denied - - -# Apache 2.2 - - Order Allow,Deny - Deny from all - +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDtool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + +# Apache 2.4 + + Require all denied + + +# Apache 2.2 + + Order Allow,Deny + Deny from all + diff --git a/scripts/cacti_user_stats.php b/scripts/cacti_user_stats.php index 0345f492e7..57e1c6ebb8 100644 --- a/scripts/cacti_user_stats.php +++ b/scripts/cacti_user_stats.php @@ -2,7 +2,7 @@ /dev/null && pwd) +SCRIPT_BASE=$(realpath "${SCRIPT_DIR}/../../")/ +SCRIPT_ERR=0 + update_copyright() { local file=$1 file=${file/$SCRIPT_BASE/} @@ -32,13 +36,11 @@ update_copyright() { old_reg="20[0-9][0-9][ ]*-[ ]*20[0-9][0-9]" old_data=$(grep -c -e "$old_reg" "$1" 2>/dev/null) new_reg="2004-$YEAR" - result=$? if [[ $old_data -eq 0 ]]; then old_reg="(Copyright.*) 20[0-9][0-9] " old_data=$(grep -c -e "$old_reg" "$1" 2>/dev/null) new_reg="\1 2004-$YEAR" - result=$? fi if [[ $old_data -gt 0 ]]; then @@ -62,18 +64,58 @@ update_copyright() { fi } -SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) -SCRIPT_BASE=$(realpath "${SCRIPT_DIR}/../../")/ +scan_folders() { + SCRIPT_INCLUSION= + SCRIPT_SEPARATOR= + for ext in $1; do + if [ -n "$SCRIPT_INCLUSION" ]; then + SCRIPT_SEPARATOR="-o " + fi + SCRIPT_INCLUSION="$SCRIPT_INCLUSION $SCRIPT_SEPARATOR-name \*.$ext" + done -BAD_FOLDERS="include/vendor \*\*/vendor include/fa cache include/js scripts" -SCRIPT_EXCLUSION= -for f in $BAD_FOLDERS; do - SCRIPT_EXCLUSION="$SCRIPT_EXCLUSION -not -path ${SCRIPT_BASE}$f/\* " -done + for f in $2; do + if [ -n "$SCRIPT_INCLUSION" ]; then + SCRIPT_SEPARATOR="-o " + fi + SCRIPT_INCLUSION="$SCRIPT_INCLUSION $SCRIPT_SEPARATOR-name $f" + done + + if [[ -n "$SCRIPT_INCLUSION" ]]; then + SCRIPT_INCLUSION="\( $SCRIPT_INCLUSION \)" + fi + + SCRIPT_SEPARATOR= + SCRIPT_EXCLUSION= + for f in $3; do + if [ -n "$SCRIPT_EXCLUSION" ]; then + SCRIPT_SEPARATOR="-o " + fi + SCRIPT_EXCLUSION="$SCRIPT_EXCLUSION $SCRIPT_SEPARATOR-path ${SCRIPT_BASE}$f/\*" + done + + for f in $4; do + if [ -n "$SCRIPT_EXCLUSION" ]; then + SCRIPT_SEPARATOR="-o " + fi + SCRIPT_EXCLUSION="$SCRIPT_EXCLUSION $SCRIPT_SEPARATOR-name $f" + done + + if [[ -n "$SCRIPT_EXCLUSION" ]]; then + SCRIPT_EXCLUSION="-not \( $SCRIPT_EXCLUSION \)" + fi + + SCRIPT_CMD="find ${SCRIPT_BASE} -type f $SCRIPT_INCLUSION $SCRIPT_EXCLUSION -print0" + bash -c "$SCRIPT_CMD" | while IFS= read -r -d '' file; do + update_copyright "${file}" + done + +} -SCRIPT_ERR=0 YEAR=$(date +"%Y") -EXT="sh sql php js md conf" +EXC_FOLDERS=".git .vscode images plugins/\*/.git include/vendor include/themes/\*/vendor include/themes/\*/default include/themes/\*/images vendor fonts include/fonts include/fa include/js" +EXC_FILES="LICENSE \*.cache \*.ttf \*.pdf \*.jpg c3.css pace.css billboard.css .rnd Diff.css \*.png \*.gif jquery\* colors.csv \*.xml.gz \*.format cacti_version \*.log \*.mo \*.po \*.pot \*.xml" +INC_EXTENSIONS="" ERRORS_ONLY=1 while [ -n "$1" ]; do case $1 in @@ -83,9 +125,13 @@ while [ -n "$1" ]; do echo "usage: copyright_year.sh [-a]" echo "" ;; + "-S" | "-S") + shift + EXC_FILES="$1" + ;; "-E" | "-e") shift - EXT="$1" + INC_EXTENSIONS="$1" ;; "-A" | "-a") ERRORS_ONLY= @@ -100,16 +146,8 @@ done # ---------------------------------------------- # PHP / JS / MD Files # ---------------------------------------------- -SCRIPT_INCLUSION= -SCRIPT_SEPARATOR= -for ext in $EXT; do - if [ -n "$SCRIPT_INCLUSION" ]; then - SCRIPT_SEPARATOR="-o " - fi - SCRIPT_INCLUSION="$SCRIPT_INCLUSION $SCRIPT_SEPARATOR-name \*.$ext" -done -SCRIPT_CMD="find ${SCRIPT_BASE} -type f \( $SCRIPT_INCLUSION \) $SCRIPT_EXCLUSION -print0" -bash -c "$SCRIPT_CMD" | while IFS= read -r -d '' file; do - update_copyright "${file}" -done +scan_folders "$INC_EXTENSIONS" "" "$EXC_FOLDERS" "$EXC_FILES" +scan_folders "" ".htaccess index.php" "" "" + +exit $SCRIPT_ERR \ No newline at end of file diff --git a/tests/tools/travis-ci-apache b/tests/tools/travis-ci-apache index b638a8e7ec..adb9a17803 100644 --- a/tests/tools/travis-ci-apache +++ b/tests/tools/travis-ci-apache @@ -1,51 +1,51 @@ -# +-------------------------------------------------------------------------+ -# | Copyright (C) 2004-2022 The Cacti Group | -# | | -# | This program is free software; you can redistribute it and/or | -# | modify it under the terms of the GNU General Public License | -# | as published by the Free Software Foundation; either version 2 | -# | of the License, or (at your option) any later version. | -# | | -# | This program is distributed in the hope that it will be useful, | -# | but WITHOUT ANY WARRANTY; without even the implied warranty of | -# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | -# | GNU General Public License for more details. | -# +-------------------------------------------------------------------------+ -# | Cacti: The Complete RRDTool-based Graphing Solution | -# +-------------------------------------------------------------------------+ -# | This code is designed, written, and maintained by the Cacti Group. See | -# | about.php and/or the AUTHORS file for specific developer information. | -# +-------------------------------------------------------------------------+ -# | http://www.cacti.net/ | -# +-------------------------------------------------------------------------+ - - - DocumentRoot /var/www/html - - AddType text/html .php - - DirectoryIndex index.php - - - Options FollowSymLinks MultiViews ExecCGI - AllowOverride All - Require all granted - - - - - SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" - - - # Wire up Apache to use Travis CI's php-fpm. - # - # AddHandler php5-fcgi .php - # Action php5-fcgi /php5-fcgi - # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi - # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization - # - # - # Require all granted - # - # - +# +-------------------------------------------------------------------------+ +# | Copyright (C) 2004-2023 The Cacti Group | +# | | +# | This program is free software; you can redistribute it and/or | +# | modify it under the terms of the GNU General Public License | +# | as published by the Free Software Foundation; either version 2 | +# | of the License, or (at your option) any later version. | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# +-------------------------------------------------------------------------+ +# | Cacti: The Complete RRDTool-based Graphing Solution | +# +-------------------------------------------------------------------------+ +# | This code is designed, written, and maintained by the Cacti Group. See | +# | about.php and/or the AUTHORS file for specific developer information. | +# +-------------------------------------------------------------------------+ +# | http://www.cacti.net/ | +# +-------------------------------------------------------------------------+ + + + DocumentRoot /var/www/html + + AddType text/html .php + + DirectoryIndex index.php + + + Options FollowSymLinks MultiViews ExecCGI + AllowOverride All + Require all granted + + + + + SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" + + + # Wire up Apache to use Travis CI's php-fpm. + # + # AddHandler php5-fcgi .php + # Action php5-fcgi /php5-fcgi + # Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi + # FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization + # + # + # Require all granted + # + # +