From e816204391093e8b13ca5b2ecfc294f33e9f708d Mon Sep 17 00:00:00 2001 From: b Date: Tue, 9 Jan 2024 01:26:29 +0000 Subject: [PATCH] fix oldlogs; don't save comment password to log file --- oldlogs.1.pl | 2 +- opomba.1.pl | 2 ++ settings.txt | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/oldlogs.1.pl b/oldlogs.1.pl index 0563fd2..7a0959f 100644 --- a/oldlogs.1.pl +++ b/oldlogs.1.pl @@ -56,7 +56,7 @@ my $logs_uncompressed = ($ARGV[3] =~ /^[0-9]+$/) ? int($&) : LOGS_UNCOMPRESSED() if (opendir_encoded(my $dir, $log_path)) { while (my $file_name = readdir_decoded($dir)) { - if ($file_name !~ /\.logo$/) { + if ($file_name !~ /\.log$/) { next; } my $full_path = join_path(PATH_SEPARATOR(), $log_path, $file_name); diff --git a/opomba.1.pl b/opomba.1.pl index 9e7ed38..2ae8adc 100644 --- a/opomba.1.pl +++ b/opomba.1.pl @@ -283,6 +283,7 @@ if ($remove) { close ($fh); if (open_encoded($fh, ">>:encoding(UTF-8)", LOG_WORDS_PATH())) { + delete ($post_data{'password'}); print $fh "$time REMOVE $ID\n"; write_data_file( $fh, \%post_data, '', @@ -350,6 +351,7 @@ unless ($r) { close($fh); if (open_encoded($fh, ">>:encoding(UTF-8)", LOG_WORDS_PATH())) { + delete ($post_data{'password'}); print $fh "$time POST $ID\n"; write_data_file( $fh, \%post_data, '', diff --git a/settings.txt b/settings.txt index 3152459..520664d 100644 --- a/settings.txt +++ b/settings.txt @@ -27,19 +27,19 @@ _PERL_OUR: our $0 = $1; _PERL_OUR_STR: @_PERL_OUR(\$$0,@_PERL_STR($1)) -_bin_path = @_PATH( $bin_path, ) -_bin_2words_path = @_PATH( $bin_path, 2words ) -_bin_attach_path = @_PATH( $bin_path, attach ) -_bin_bbcode_path = @_PATH( $bin_path, bbcode ) -_bin_coin_path = @_PATH( $bin_path, chat ) -_bin_frame_path = @_PATH( $bin_path, frame ) -_bin_goto_path = @_PATH( $bin_path, goto ) -_bin_info_path = @_PATH( $bin_path, info ) -_bin_oldlogs_path = @_PATH( $bin_path, oldlogs ) -_bin_ong_path = @_PATH( $bin_path, ong.pl ) -_bin_reset_path = @_PATH( $bin_path, reset.pl) -_bin_viewer_path = @_PATH( $bin_path, viewer ) -_bin_words_path = @_PATH( $bin_path, opomba ) +_bin_path = @_PATH( $bin_path, ) +_bin_2words_path = @_PATH( $bin_path, 2words ) +_bin_attach_path = @_PATH( $bin_path, attach ) +_bin_bbcode_path = @_PATH( $bin_path, bbcode ) +_bin_coin_path = @_PATH( $bin_path, chat ) +_bin_frame_path = @_PATH( $bin_path, frame ) +_bin_goto_path = @_PATH( $bin_path, goto ) +_bin_info_path = @_PATH( $bin_path, info ) +_bin_oldlogs_path = @_PATH( $bin_path, oldlogs.pl) +_bin_ong_path = @_PATH( $bin_path, ong.pl ) +_bin_reset_path = @_PATH( $bin_path, reset.pl ) +_bin_viewer_path = @_PATH( $bin_path, viewer ) +_bin_words_path = @_PATH( $bin_path, opomba ) _cgi_path = @_PATH( $cgi_path, ) _cgi_2words_path = @_PATH( $cgi_path, 2words ) -- 2.30.2