From: b Date: Mon, 12 Feb 2024 23:30:38 +0000 (+0000) Subject: don't include empty password in words links X-Git-Tag: v1.2.7 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=f6af9cd6d1838e6bddcc7f16c33d4a0469b508da;p=ott%2Fbsta don't include empty password in words links --- 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);