Adjust patchfile 'do-not-log-usr-ip.patch'.

This commit is contained in:
Christoph 2022-06-12 14:35:52 +02:00
parent 98827ca563
commit 21228b2dc8
2 changed files with 19 additions and 11 deletions

View File

@ -1,12 +1,12 @@
diff -Naur sympa/src/cgi/wwsympa.fcgi.in sympa-changed/src/cgi/wwsympa.fcgi.in
--- sympa/src/cgi/wwsympa.fcgi.in 2022-01-24 08:05:58.000000000 +0100
+++ sympa-changed/src/cgi/wwsympa.fcgi.in 2022-06-10 18:13:06.474595910 +0200
+++ sympa-changed/src/cgi/wwsympa.fcgi.in 2022-06-12 14:22:36.692771967 +0200
@@ -1842,7 +1842,7 @@
my %options = %{$data || {}};
- $options{'client'} = $param->{'remote_addr'};
+ $options{'client'} = '127.127.0.1';
+ $options{'client'} = '127.0.125.1';
$options{'daemon'} = 'wwsympa';
$options{'robot'} ||= $robot;
$options{'list'} ||= $list->{'name'} if ref $list eq 'Sympa::List';
@ -15,37 +15,45 @@ diff -Naur sympa/src/cgi/wwsympa.fcgi.in sympa-changed/src/cgi/wwsympa.fcgi.in
$options{'list'} ||= $list->{'name'} if ref $list eq 'Sympa::List';
$options{'daemon'} = 'wwsympa';
- $options{'client'} = $param->{'remote_addr'};
+ $options{'client'} = '127.127.0.1';
+ $options{'client'} = '127.0.125.1';
$options{'robot'} ||= $robot;
unless ($log->add_stat(%options)) {
diff -Naur sympa/src/lib/Sympa/Log.pm sympa-changed/src/lib/Sympa/Log.pm
--- sympa/src/lib/Sympa/Log.pm 2021-12-09 09:54:08.000000000 +0100
+++ sympa-changed/src/lib/Sympa/Log.pm 2022-06-10 18:15:53.437052215 +0200
@@ -299,7 +299,12 @@
+++ sympa-changed/src/lib/Sympa/Log.pm 2022-06-12 14:19:06.885663503 +0200
@@ -299,7 +299,16 @@
my $status = $options{'status'};
my $error_type = $options{'error_type'};
my $user_email = $options{'user_email'};
- my $client = $options{'client'};
+ my $client;
+ if (defined $options{'client'} && length $options{'client'} > 0) {
+ $client = '127.127.0.1';
+ if ($options{'client'} !~ /^127/) {
+ $client = '127.126.0.1';
+ } else {
+ $client = $options{'client'};
+ }
+ } else {
+ $client = $options{'client'};
+ $client = $options{'client'};
+ }
my $daemon = $self->{_service} || 'sympa';
my ($date, $usec) = Sympa::Tools::Time::gettimeofday();
@@ -357,7 +362,12 @@
@@ -357,7 +366,16 @@
my $date = time;
my $mail = $options{'mail'};
my $daemon = $self->{_service} || 'sympa';
- my $ip = $options{'client'};
+ my $ip;
+ if (defined $options{'client'} && length $options{'client'} > 0) {
+ $ip = '127.127.0.1';
+ if ($options{'client'} !~ /^127/) {
+ $ip = '127.126.0.1';
+ } else {
+ $ip = $options{'client'};
+ }
+ } else {
+ $ip = $options{'client'};
+ $ip = $options{'client'};
+ }
my $robot = $options{'robot'};
my $parameter = $options{'parameter'};

View File

@ -257,7 +257,7 @@ DEFAULT_VSERVER_GUEST="no"
PATCH_FILE_NO_LOG_USER_IP="${working_dir}/do-not-log-usr-ip.patch"
DEFAULT_APPLY_LOG_NO_USER_IP="np"
DEFAULT_APPLY_LOG_NO_USER_IP="no"
echo