From 6fe35cbd50d318bed8d12c5d9fc2602f8936f883 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 21 Mar 2023 13:32:12 +0100 Subject: Switched from CDN to a npm+bundler for css framework and crypto-js --- src/login_cram.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/login_cram.js (limited to 'src/login_cram.js') diff --git a/src/login_cram.js b/src/login_cram.js new file mode 100644 index 0000000..7faa646 --- /dev/null +++ b/src/login_cram.js @@ -0,0 +1,9 @@ +import HmacMD5 from 'crypto-js/hmac-md5'; + +document.login1.submit_button.disabled = false; + +document.forms.login1.addEventListener("formdata", (form_data_evt) => { + const form_data = form_data_evt.formData; + const res = HmacMD5(form_data.get("challenge"), form_data.get("password")); + form_data.set("password", res); +}); -- cgit v1.2.3