Indexofpassword -

if (userInput.username && newPassword.toLowerCase().indexOf(userInput.username.toLowerCase()) !== -1) return reject("Password cannot contain username");

Logic: if (input.indexOf("password") !== -1) then the password is weak. indexofpassword

Keywords: indexofpassword, secure string handling, password parsing vulnerability, indexOf security risks, avoid manual query parsing if (userInput

Users occasionally upload password spreadsheets to a web server to "access them from anywhere," forgetting that if a search engine can find it, anyone can. The Risks of Directory Leaks secure string handling