diff options
-rwxr-xr-x | gpigeon-template.cgi | 16 | ||||
-rw-r--r-- | link-tmpl-template.cgi | 2 |
2 files changed, 6 insertions, 12 deletions
diff --git a/gpigeon-template.cgi b/gpigeon-template.cgi index e8c5036..8266faa 100755 --- a/gpigeon-template.cgi +++ b/gpigeon-template.cgi @@ -229,14 +229,8 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) } if (defined $cgi_query_get->param('supprtout')){ - opendir my $link_dir_handle, './l' or die "Can't open ./l: $!"; - while (readdir $link_dir_handle) { - if ($_ ne '.' and $_ ne '..'){ - unlink UntaintCGIFilename("./l/$_") or die "$!"; - $deletion_notif = qq{<span id="success">$text_strings{link_del_ok}</span>}; - } - } - closedir $link_dir_handle; + rmtree('./l', {keep_root => 1, safe => 1}); + $deletion_notif = qq{<span id="success">$text_strings{link_del_ok}</span>}; } if (defined $cgi_query_get->param('mail')){ @@ -263,7 +257,7 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) close $in or die; chmod(0755,$link_path) or die; close $out or die; - $linkgen_notif = qq{<span id="success">$text_strings{link_ok_for} $link_asker: </span><br><a href="$href">$href</a>}; + $linkgen_notif = qq{<span id="success">$text_strings{link_ok_for} $link_asker: </span><br><a target="_blank" rel="noopener noreferrer nofollow" href="$href">$href</a>}; } else{ $mailisok_notif = qq{<span id="failure">$text_strings{addr} $link_asker $text_strings{addr_nok}.</span>}; @@ -285,7 +279,7 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) if (Email::Valid->address($link_asker)){ push @created_links, qq{<tr> - <td><a href="/cgi-bin/l/$linkfile_fn">$text_strings{here}</a></td> + <td><a target="_blank" rel="noopener noreferrer nofollow" href="/cgi-bin/l/$linkfile_fn">$text_strings{here}</a></td> <td><a href="mailto:$link_asker?subject=$text_strings{mailto_subject}&body=$text_strings{mailto_body} http://$hostname/cgi-bin/l/$linkfile_fn">$link_asker</a></td> <td> <form method="POST"> @@ -327,7 +321,7 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) <form method="POST"> $hidden_pwfield $text_strings{link_asker_field_label}<br> - <input tabindex="1" type="text" name="mail"> + <input id="mailfield" tabindex="1" type="text" name="mail"> <input id="genlinkbtn" tabindex="2" type="submit" value="$text_strings{create_link_btn}"> </form>}, NotifIfDefined($mailisok_notif), diff --git a/link-tmpl-template.cgi b/link-tmpl-template.cgi index c060131..87b4b1a 100644 --- a/link-tmpl-template.cgi +++ b/link-tmpl-template.cgi @@ -106,7 +106,7 @@ print qq{<!DOCTYPE html> <title>{link_web_title}</title> </head> <body> - <p>{type_msg_below}:</p> + <p id="msgbelow">{type_msg_below}:</p> <form method="POST"> <textarea id="msg" wrap="off" cols="50" rows="30" name="msg"></textarea><br> }; |