From a3d9855538e97901b8d70140e985d1ac530fbf29 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Tue, 20 Jul 2021 20:25:10 +0100 Subject: fix Makefile and gpg key export during it. - esthetic improvments too, in particular the links table: Added the correct id on the linkstable, the styles from css weren't applied. - some variables were used but not declared beforehand in the cookie check function in gpigeon-template.cgi. we fix that --- gpigeon-template.cgi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gpigeon-template.cgi') diff --git a/gpigeon-template.cgi b/gpigeon-template.cgi index 9eb82d5..dda7d62 100755 --- a/gpigeon-template.cgi +++ b/gpigeon-template.cgi @@ -19,9 +19,10 @@ use warnings; use strict; use File::Path qw(mkpath rmtree); -use Crypt::Argon2 qw(argon2id_verify); +use File::stat; use Email::Valid; use String::Random; +use Crypt::Argon2 qw(argon2id_verify); use CGI qw(param); use CGI::Cookie; use CGI::Carp qw(fatalsToBrowser); @@ -148,6 +149,7 @@ my %text_strings = ( theader_link => 'Link', theader_for => 'For', theader_deletion => 'Deletion', + theader_cdate => 'Created on', web_greet_msg => 'Hi and welcome.', ); my $cgi_query_get = CGI->new; @@ -245,6 +247,8 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) while (readdir $link_dir_handle) { if ($_ ne '.' and $_ ne '..'){ my $linkfile_fn = $_; + my $linkstats = stat("./l/$linkfile_fn"); + my $linkcdate = scalar localtime $linkstats->mtime; if (open my $linkfile_handle , '<', "./l/$linkfile_fn"){ for (1..2){ $link_asker = readline $linkfile_handle; @@ -258,6 +262,7 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw) qq{ $text_strings{here} $link_asker + $linkcdate
$hidden_pwfield @@ -312,11 +317,12 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw)
$deletion_notif - + - - - + + + + @created_links
$text_strings{theader_link} 🔗$text_strings{theader_for} 📧$text_strings{theader_deletion} 🗑🔗 $text_strings{theader_link}📧 $text_strings{theader_for}📅 $text_strings{theader_cdate}❌ $text_strings{theader_deletion}
@@ -364,7 +370,7 @@ qq{

Source code here. It is similar to hawkpost.co.

+ title="gpigeon download link">Source code here. It is similar to hawkpost.co.

}; -- cgit v1.2.3-70-g09d2