diff --git a/misc/api.func b/misc/api.func index 7944dc4d9..a2cc42e07 100644 --- a/misc/api.func +++ b/misc/api.func @@ -391,9 +391,10 @@ get_full_log() { fi if [[ -n "$logfile" && -s "$logfile" ]]; then - # Strip ANSI codes and carriage returns, then truncate to max_bytes + # Strip ANSI codes, carriage returns, and anonymize IP addresses (GDPR) sed 's/\r$//' "$logfile" 2>/dev/null | sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' | + sed -E 's/([0-9]{1,3}\.)[0-9]{1,3}\.[0-9]{1,3}/\1x.x/g' | head -c "$max_bytes" fi }