markashleybell-org / vault

A simple web app for storing encrypted login/password details.
0 stars 1 forks source link

Password strength meter isn't updating as you type #148

Open markashleybell opened 2 years ago

markashleybell commented 2 years ago

Create a new credential; when you type in a password, the strength meter stays at 'No Password':

image

markashleybell commented 2 years ago

It does work when you generate a password, and also when you reopen the new credential record, so there must just be a missing event handler somewhere.

markashleybell commented 2 years ago

This was REALLY weird.

TL;DR: the code was looking at event.target instead of event.currentTarget (which was wrong), but the weird bit was that event.target was somehow a different element for the keyup event in the live app than it was locally.

So running locally, all the code works fine. Running in the live app, it doesn't. I've even diffed both the HTML and minified JS between my local PC and the live version, and they were identical.

So I have absolutely no idea why this was broken, but changing to the correct element reference fixes it anyway.

markashleybell commented 2 years ago

AAAAAAAAAAANNNNNND... no it doesn't, this is still broken in the live app.

So I literally have no idea what to try next, because locally, it all works perfectly.

markashleybell commented 2 years ago

Ok—so it's the rate limiting function I'm using. Removed for now.

I still have no idea how an identical static piece of client-side code could behave differently under different environments... but here we are.