From febfd792ce3a63314c980cc29440cf2f127953b4 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 5 May 2022 14:41:10 +0200 Subject: propper cram support (baring some details rng) --- templates/webmail/login.html.ep | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'templates/webmail/login.html.ep') diff --git a/templates/webmail/login.html.ep b/templates/webmail/login.html.ep index 3e224a8..0b7b080 100644 --- a/templates/webmail/login.html.ep +++ b/templates/webmail/login.html.ep @@ -1,5 +1,7 @@ % layout 'mainlayout'; +% my $uses_cram = config->{session}{secure} eq 'cram'; +

@@ -22,14 +24,36 @@ %= label_for password => ucfirst l 'passwd' %= password_field 'password' => (required => '')

+% if ($uses_cram) { + %= hidden_field challenge => rand +% }
- %= submit_button l('login') => (class => 'pure-button pure-button-primary') + %= submit_button l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => '') : ()
% end +% if ($uses_cram) { + + + + +% } + %= javascript begin if (!document.login1.userid.value) { document.login1.userid.focus(); -- cgit v1.2.3