Merge branch 'ReturnEnd-patch-1'
This commit is contained in:
commit
711d7e16a6
|
@ -4,15 +4,15 @@
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Logger = require('util/logger');
|
const Logger = require('util/logger').Logger;
|
||||||
// change log level here.
|
// change log level here.
|
||||||
const LogLevel = Logger.Level.Info;
|
const LogLevel = Logger.Level.Info;
|
||||||
|
|
||||||
const DetailsView = require('views/details/details-view');
|
const DetailsView = require('views/details/details-view').DetailsView;
|
||||||
const InputFx = require('util/input-fx');
|
const InputFx = require('util/ui/input-fx').InputFx;
|
||||||
const Kdbxweb = require('kdbxweb');
|
const Kdbxweb = require('kdbxweb');
|
||||||
const _ = require('_');
|
const utilFn = require('util/fn');
|
||||||
const Tip = require('util/tip');
|
const Tip = require('util/ui/tip').Tip;
|
||||||
const detailsViewFieldChanged = DetailsView.prototype.fieldChanged;
|
const detailsViewFieldChanged = DetailsView.prototype.fieldChanged;
|
||||||
|
|
||||||
let _seen = [];
|
let _seen = [];
|
||||||
|
@ -142,7 +142,7 @@ DetailsView.prototype.checkNamePwned = function (name) {
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
hibp.logger.debug('found breaches ' + JSON.stringify(data));
|
hibp.logger.debug('found breaches ' + JSON.stringify(data));
|
||||||
let breaches = '';
|
let breaches = '';
|
||||||
data.forEach(breach => { breaches += '<li>' + _.escape(breach.Name) + '</li>\n'; });
|
data.forEach(breach => { breaches += '<li>' + utilFn.escape(breach.Name) + '</li>\n'; });
|
||||||
hibp.alert(this.userEditView.$el, `WARNING! This account has been pawned in the following breaches<br/>\n<ul>\n${breaches}\n</ul>\n<p>Please check on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>\n`);
|
hibp.alert(this.userEditView.$el, `WARNING! This account has been pawned in the following breaches<br/>\n<ul>\n${breaches}\n</ul>\n<p>Please check on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>\n`);
|
||||||
} else {
|
} else {
|
||||||
hibp.passed(this.userEditView.$el, 'check pwned user name passed...');
|
hibp.passed(this.userEditView.$el, 'check pwned user name passed...');
|
||||||
|
@ -168,7 +168,7 @@ DetailsView.prototype.checkPwdPwned = function (passwordHash) {
|
||||||
const h = line.split(':');
|
const h = line.split(':');
|
||||||
const suffix = h[0];
|
const suffix = h[0];
|
||||||
if (prefix + suffix === passwordHash) {
|
if (prefix + suffix === passwordHash) {
|
||||||
const nb = _.escape(h[1]);
|
const nb = utilFn.escape(h[1]);
|
||||||
hibp.alert(this.passEditView.$el, `WARNING: This password is referenced as pawned ${nb} times on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>!\n`);
|
hibp.alert(this.passEditView.$el, `WARNING: This password is referenced as pawned ${nb} times on <a href='https://haveibeenpwned.com'>https://haveibeenpwned.com</a>!\n`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue