PHP Classes

File: src/Installer/skins/js/admin_account.js.twig

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/Installer/skins/js/admin_account.js.twig   Download  
File: src/Installer/skins/js/admin_account.js.twig
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,619 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" href="https://github.com/keepassx/keepassx/" rel="noopener noreferrer">KeePassX</a>.'; } else if (score === 3) { $("#password_feedback") .addClass('passwordBad') .removeClass('passwordAcceptable') .removeClass('passwordGood'); html += "<br />If you use this password, it might be guessable by criminals. Please make your administrator account password more secure."; } 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. Please make your administrator account password more secure."; } 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. Please make your administrator account password more secure."; } $("#password_feedback").html(html); } $(document).ready(function() { $("#passphrase").change(function() { var zx = zxcvbn($("#passphrase").val()); console.log(JSON.stringify(zx)); passwordWarning(zx.feedback.warning, zx.score); }); });