diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-03-21 13:32:12 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-03-21 13:32:12 +0100 |
commit | 6fe35cbd50d318bed8d12c5d9fc2602f8936f883 (patch) | |
tree | 6b9c9f891552a1beacdc11f646b7dd9000d46021 /templates/webmail/login.html.ep | |
parent | 35c4aba3471691685592547300ca5bb588adeb53 (diff) |
Switched from CDN to a npm+bundler for css framework
and crypto-js
Diffstat (limited to 'templates/webmail/login.html.ep')
-rw-r--r-- | templates/webmail/login.html.ep | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/templates/webmail/login.html.ep b/templates/webmail/login.html.ep index 28768e3..706dc1c 100644 --- a/templates/webmail/login.html.ep +++ b/templates/webmail/login.html.ep @@ -28,7 +28,7 @@ %= hidden_field challenge => rand % } <div class="pure-controls"> - %= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => '') : () + %= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => undef) : () </div> </fieldset> % end @@ -36,22 +36,7 @@ </div> % if ($uses_cram) { -<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js" - integrity="sha512-E8QSvWZ0eCLGk4km3hxSsNmGWbLtSCSUcewDQPQWZF6pEU8GlT8a5fF32wOl1i8ftdMhssTrF/OhyGWwonTcXA==" - crossorigin="anonymous" referrerpolicy="no-referrer"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/hmac-md5.min.js" - integrity="sha512-gy8JaBxTrtIxNLe1FfMAXey61VjQk3Af4EyY/EpVfmWPH16iCgdRZMHEFgKIyxMrarlc6+rDf6WneGL4SWqnpg==" - crossorigin="anonymous" referrerpolicy="no-referrer"></script> - -<script> - document.login1.submit_button.disabled = false; - - document.forms.login1.addEventListener("formdata", (form_data_evt) => { - const form_data = form_data_evt.formData; - const res = CryptoJS.HmacMD5(form_data.get("challenge"), form_data.get("password")) - form_data.set("password", res) - }); -</script> +%= javascript '/src/login_cram.js' % } %= javascript begin |