aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-07-18 20:25:05 +0100
committerMiquel Lionel <lionelmiquel@sfr.fr>2021-07-18 20:25:56 +0100
commitc83b9a6fa04d3f71bc1100ba33f6bf3745932f0b (patch)
tree1b680dbe459a3f6f442273bf685f409eb87e8a76
parentd55095b26b988192a209218fd00af872d9811302 (diff)
downloadgpigeon-c83b9a6fa04d3f71bc1100ba33f6bf3745932f0b.tar.gz
gpigeon-c83b9a6fa04d3f71bc1100ba33f6bf3745932f0b.zip
fixes h1 and some field not having correct type
- Also move back the $link_user variable in link-tmpl.cgi to top of file. needed to read the people we generated a link for
-rwxr-xr-xgpigeon-template.cgi8
-rw-r--r--link-tmpl-template.cgi6
2 files changed, 8 insertions, 6 deletions
diff --git a/gpigeon-template.cgi b/gpigeon-template.cgi
index 7757bcb..95e139b 100755
--- a/gpigeon-template.cgi
+++ b/gpigeon-template.cgi
@@ -210,8 +210,9 @@ my %text_strings = (
delete_link_btn_text => 'Delete',
delete_links_btn_text => 'Delete all links',
disconnect_btn_text => 'Disconnect',
- logout_btn_text => 'Logout',
here => 'here',
+ landingpage_title => 'GPIGEON - Log in',
+ logout_btn_text => 'Logout',
loginbtn => 'Log in',
link_asker_field_label => "Asker's mail :",
link_del_ok => 'Successful removal !',
@@ -228,7 +229,7 @@ my %text_strings = (
theader_for => 'For',
theader_deletion => 'Deletion',
username_label => 'Username',
- web_title => 'GPIGEON.CGI: generate one time GPG messaging links !',
+ web_title => 'GPIGEON.CGI - Main',
web_greet_msg => 'Hi and welcome. What will you do today ?',
);
@@ -411,6 +412,7 @@ if($loginok){
<title>$text_strings{web_title}</title>
</head>
<body>
+ <h1>$text_strings{web_title}</h1>
<p>$text_strings{web_greet_msg}</p>
<form method="GET">
<input type="hidden" name="disconnect" value="1">
@@ -471,7 +473,7 @@ qq{<!DOCTYPE html>
<tbody>
<tr>
<td>$text_strings{username_label} :</td>
- <td><input type="password" name="password"></td>
+ <td><input type="text" name="username"></td>
</tr>
<tr>
<td>$text_strings{password_label} :</td>
diff --git a/link-tmpl-template.cgi b/link-tmpl-template.cgi
index 3189b8f..2f5ab0b 100644
--- a/link-tmpl-template.cgi
+++ b/link-tmpl-template.cgi
@@ -1,4 +1,5 @@
#! /usr/bin/perl -T
+my $linkuser = q{link_user};
# link-tmpl.cgi : self-destructing message form to send yourself GPG
# encrypted messages. Part of gpigeon.
@@ -16,7 +17,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Copyright (c) 2020-2021, Miquel Lionel <lionel@les-miquelots.net>
-my $linkuser = q{link_user};
use warnings;
use strict;
use CGI qw(param);
@@ -37,6 +37,7 @@ sub GetRFC822Date {
my $HAS_MAILSERVER = q{has_mailserver_goes_here};
my $msg_form_char_limit = q{msg_char_limit_goes_here};
+my $max_mb = 100;
my $mailaddr = q{user_mailaddr_goes_here};
my $mailsender = q{sender_addr_goes_here};
my $mailsender_smtp = q{smtp_domain_goes_here};
@@ -48,7 +49,6 @@ my $msg_form = $cgi_query_get->param('msg');
my $length_msg_form = length $msg_form;
my ($smtp, $enc_msg) = undef;
my $form_error_notif = '<!-- undef notif -->';
-my $max_mb = 100;
$CGI::POST_MAX = 1024*1024*$max_mb; # 100MBytes
my $fupload_limit = $CGI::POST_MAX;
@@ -86,7 +86,7 @@ else {
$fullfn =~ s/__+/_/g;
my $fpath = $cgi_query_get->tmpFileName($fh) or die "can't get uploaded file name: $!";
my $fsize = -s $fpath;
- if ($fsize > $fsize_limit){
+ if ($fsize > $fupload_limit){
die 'ERROR: File is too big (>100MB).'; # I don't think we'll se this error, it'll return 413 instead
}