Merge pull request #3139 from nextcloud/enh/noid/disable-logging

disable logging for domain-validator.php
This commit is contained in:
Simon L 2023-08-17 09:38:53 +02:00 committed by GitHub
commit 9cd867f8d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -57,9 +57,10 @@ command=/session-deduplicator.sh
user=root user=root
[program:domain-validator] [program:domain-validator]
# Logging is disabled as otherwise all attempts will be logged which spams the logs
# stdout_logfile=/dev/stdout # stdout_logfile=/dev/stdout
# stdout_logfile_maxbytes=0 # stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr # stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 # stderr_logfile_maxbytes=0
command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php
user=www-data user=www-data

View file

@ -13,6 +13,7 @@ if (strpos($domain, '.') === false) {
} elseif (filter_var($domain, FILTER_VALIDATE_IP)) { } elseif (filter_var($domain, FILTER_VALIDATE_IP)) {
http_response_code(400); http_response_code(400);
} else { } else {
error_log($domain . ' was accepted as valid domain.'); // Commented because logging is disabled as otherwise all attempts will be logged which spams the logs
// error_log($domain . ' was accepted as valid domain.');
http_response_code(200); http_response_code(200);
} }