From c9d61e8aaf1b7ffa05224f574bfdaa6a1768df37 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 10 Dec 2023 10:17:22 +0100 Subject: [PATCH] Add captcha difficulty hard --- common_config.php | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/common_config.php b/common_config.php index 3d7f474..18ab453 100644 --- a/common_config.php +++ b/common_config.php @@ -11,7 +11,7 @@ const DBPASS = 'YOUR_PASSWORD'; // Database password const DBNAME = 'postfix'; // Database const DBVERSION = 1; // Database schema version const PERSISTENT = true; // persistent database connection -const CAPTCHA_DIFFICULTY = 1; // captcha difficulty from 0 to 3 +const CAPTCHA_DIFFICULTY = 1; // captcha difficulty from 0 to 4 const RESERVED_USERNAMES = ['about', 'abuse', 'admin', 'administrator', 'billing', 'contact', 'daemon', 'ftp', 'help', 'hostmaster', 'info', 'legal', 'list', 'list-request', 'lists', 'maildaemon', 'mailerdaemon', 'mailer-daemon', 'marketing', 'media', 'news', 'newsletter', 'nobody', 'noc', 'noreply', 'no-reply', 'notification', 'notifications', 'notify', 'offer', 'offers', 'office', 'official', 'order', 'orders', 'phish', 'phishing', 'postmaster', 'root', 'sale', 'sales', 'security', 'service', 'services', 'shop', 'shopping', 'spam', 'staff', 'support', 'survey', 'system', 'team', 'teams', 'unsbubscribe', 'uucp', 'usenet', 'user', 'username', 'users', 'web', 'webmail', 'webmaster', 'webmasters', 'welcome', 'www']; // list of reserved usernames that can mot be used on public registration const CANONICAL_URL = 'https://danwin1210.de/mail/'; // our preferred URL prefix for search engines const PRIVACY_POLICY_URL = '/privacy.php'; // URL to privacy policy @@ -162,6 +162,45 @@ function send_captcha(): void imagesetpixel( $im, mt_rand( 0, 55 ), mt_rand( 0, 24 ), $dots ); } echo '