From f6af9cd6d1838e6bddcc7f16c33d4a0469b508da Mon Sep 17 00:00:00 2001 From: b Date: Mon, 12 Feb 2024 23:30:38 +0000 Subject: [PATCH] don't include empty password in words links --- bsta_lib.1.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index 8add7fa..0e45103 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -1679,7 +1679,6 @@ sub print_comments { 'query' => { 'f' => $frame, 'quote' => $ID, - 'p' => ($password_ok ? $settings->{'password'} : '') } } ); @@ -1691,7 +1690,6 @@ sub print_comments { 'edit' => $ID, 'key' => $post_data{'key'}, 'username' => $post_data{'name'}, - 'p' => ($password_ok ? $settings->{'password'} : '') } } ); @@ -1703,10 +1701,14 @@ sub print_comments { 'remove' => $ID, 'key' => $post_data{'key'}, 'username' => $post_data{'name'}, - 'p' => ($password_ok ? $settings->{'password'} : '') } } ); + if ($password_ok) { + $quote_url = merge_url($quote_url , {'query' => $password_query, 'append_query' => 1, 'preserve_fragment' => 1}); + $edit_url = merge_url($edit_url , {'query' => $password_query, 'append_query' => 1, 'preserve_fragment' => 1}); + $remove_url = merge_url($remove_url, {'query' => $password_query, 'append_query' => 1, 'preserve_fragment' => 1}); + } my $_ID = html_entity_encode_dec($ID, 1); my $_name = html_entity_encode_dec($post_data{'name'}, 1); -- 2.30.2