PHP Classes

File: src/Cabin/Bridge/public/passwords.js

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/Cabin/Bridge/public/passwords.js   Download  
File: src/Cabin/Bridge/public/passwords.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change: Mitigate target="_blank" phishing attacks.

Add rel="noopener noreferrer" to <a> tags which have target="_blank".

Reported on [HackerOne](https://hackerone.com/reports/181225).
Date: 7 years ago
Size: 2,208 bytes
 

Contents

Class file image Download
function passwordWarning(text, score) { var html = ''; switch (text) { case 'Common names and surnames are easy to guess': html = "The password you chose appears to be similar to a common name or surname."; break; case 'This is a top-10 common password': html = "The password you chose is one of the 10 most common passwords that other people choose."; break; case 'This is a top-100 common password': html = "The password you chose is one of the 100 most common passwords that other people choose."; break; case 'This is a very common password': html = "The password you chose is very common."; break; case 'This is similar to a commonly used password': html = "The password you chose is similar to a commonly used password."; break; } if (score === 4) { $("#password_feedback") .removeClass('passwordBad') .removeClass('passwordAcceptable') .addClass('passwordGood'); html = 'Good password, as long as it\'s unique!<br />If you\'re not already, consider using a password manager such as <a target="_blank" rel="noopener noreferrer" href="https://github.com/keepassx/keepassx/">KeePassX</a>.'; } else if (score === 3) { $("#password_feedback") .removeClass('passwordBad') .addClass('passwordAcceptable') .removeClass('passwordGood'); html += "<br />If you use this password, it might be guessable by criminals."; } else if (score === 2) { $("#password_feedback") .addClass('passwordBad') .removeClass('passwordAcceptable') .removeClass('passwordGood'); html += "<br />If you use this password, it will be easily guessable by criminals."; } else { $("#password_feedback") .addClass('passwordBad') .removeClass('passwordAcceptable') .removeClass('passwordGood'); html += "<br />If you use this password, it will be <em>very</em> easily guessable by criminals."; } $("#password_feedback").html(html); }