aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-04-16 23:01:38 +0100
committerMiquel Lionel <lionelmiquel@sfr.fr>2021-04-16 23:03:02 +0100
commit0d0ec0c1c57999db567e2a538bdd6e8976a68b8e (patch)
treeb89235db28acd866e7207f95089d1e7f4be63809
parentf65887f1ee0a94aa2c81140d29d0634f1be7b3c3 (diff)
downloadgpigeon-0d0ec0c1c57999db567e2a538bdd6e8976a68b8e.tar.gz
gpigeon-0d0ec0c1c57999db567e2a538bdd6e8976a68b8e.zip
reinstate index.html, static is king
-rw-r--r--Makefile9
-rwxr-xr-xgpigeon-template.cgi24
-rw-r--r--index.html19
3 files changed, 25 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 0799e98..16f4507 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,8 @@ install:
mkdir -p $(DESTDIR)$(_GPG_HOMEDIR)
chmod 700 $(DESTDIR)$(_GPG_HOMEDIR)
mkdir -p $(DESTDIR)$(WWWPREFIX)/cgi-bin/l
- cp -f gpigeon-template.cgi $(DESTDIR)$(WWWPREFIX)/cgi-bin/gpigeon.cgi
+ cp -f gpigeon-template.cgi $(DESTDIR)$(WWWPREFIX)/cgi-bin/
+ cp -f index.html $(DESTDIR)$(WWWPREFIX)/
chmod 700 $(DESTDIR)$(WWWPREFIX)/cgi-bin/gpigeon.cgi
if test -z '$(ARGON2ID_HASH)'; then \
perl genpass.pl > genpass.txt; \
@@ -41,11 +42,11 @@ install:
fi
sed -e "s|has_mailserver_goes_here|$(HAS_MAILSERVER)|g" -i $(DESTDIR)$(LINK_TEMPLATE_PATH)
sed -e "s|gpg_homedir_goes_here|$(_GPG_HOMEDIR)|g" -i $(DESTDIR)$(LINK_TEMPLATE_PATH)
- cp -f styles.css $(DESTDIR)$(WWWPREFIX)
+ cp -f styles.css $(DESTDIR)$(WWWPREFIX)/
chmod 644 $(DESTDIR)$(WWWPREFIX)/styles.css
- cp -f favicon.ico $(DESTDIR)$(WWWPREFIX)
+ cp -f favicon.ico $(DESTDIR)$(WWWPREFIX)/
chmod 644 $(DESTDIR)$(WWWPREFIX)/favicon.ico
- cp -rf merci $(DESTDIR)$(PREFIX)
+ cp -rf merci $(DESTDIR)$(PREFIX)/
chmod 755 -R $(DESTDIR)$(PREFIX)
if test -e 'genpass.txt'; then \
printf "\n\nThe variable ARGON2ID_HASH wasn't declared thus a password and its argon2id hash as been generated (look into genpass.txt)."; \
diff --git a/gpigeon-template.cgi b/gpigeon-template.cgi
index 5470dfd..9f9dc4c 100755
--- a/gpigeon-template.cgi
+++ b/gpigeon-template.cgi
@@ -120,7 +120,6 @@ my %text_strings = (
delete_links_btn_text => 'Delete all links',
logout_btn_text => 'Logout',
here => 'here',
- login => 'Login',
link_asker_field_label => q{Asker's mail :},
link_web_title => 'One time GPG messaging form',
link_del_ok => 'Successful removal !',
@@ -131,7 +130,6 @@ my %text_strings = (
mailto_body => 'Your link is ',
mailto_subject => 'Link to your one time GPG messaging form',
notif_login_failure => 'Cannot login. Check if your username and password match.'
- passwd_label => 'Password :',
refresh_btn_text => 'Refresh',
type_msg_below => 'Type your message below',
theader_link => 'Link',
@@ -322,25 +320,5 @@ if (ValidCookie($id_cookie, $cookies_dir) or argon2id_verify($argon2id_hash,$pw)
</html>};
}
else{
- print "Content-Type: text/html\n\n",
- qq{<!DOCTYPE html>
- <html>
- <head>
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
- <link rel="stylesheet" type="text/css" href="/styles.css">
- <title>$text_strings{web_title}</title>
- <meta charset="utf-8">
- </head>
- <body>
- <form action="/cgi-bin/gpigeon.cgi" method="POST">
- <h1>GPIGEON</h1>
- <label for="pwfield">&nbsp;$text_strings{passwd_label}:</label>
- <input id="pwfield" type="password" name="password"><br>
- <input type="submit" value="$text_strings{login}">
- </form>
- <p>&nbsp;<a
- href="http://git.les-miquelots.net/gpigeon"
- title="gpigeon download link" alt="gpigeon download link">Source code here.</a> It is similar to <a href="https://hawkpost.co/">hawkpost.co</a>.</p>
- </body>
- </html>};
+ print "Location: /\n\n";
}
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..b88c8a0
--- /dev/null
+++ b/index.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>GPIGEON - Login</title>
+ <link rel="icon" type="image/x-icon" href="/favicon.ico">
+ <link rel="stylesheet" type="text/css" href="/styles.css">
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <h1 style="text-align:center">GPIGEON</h1>
+ <form action="/cgi-bin/gpigeon.cgi" method="POST">
+ Password : <input type="password" name="password">
+ <input type="submit" value="Login">
+ </form>
+
+ <p><a href="http://git.les-miquelots.net/gpigeon" title="gpigeon download link" alt="gpigeon download link">Source code here.</a> It is similar to <a href="https://hawkpost.co/">hawkpost.co</a>.</p>
+
+ </body>
+</html>