Skip to content

Commit

Permalink
for #175, use new encryption for rules w/ password
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Jul 6, 2022
1 parent cd9229e commit 7482746
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/server/imapSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"use strict";

var Imap = require('imap');
var simplecrypt = require('simplecrypt');
// var moment = require('moment');

var utils = require('../utils');
var log = require('../logger');
var Eventer = require('../eventer');

Expand All @@ -17,9 +15,6 @@ var PatternsService = require('./patternsService');
var retrySecs = 30;
var searchDelaySecs = 2;

// FIXME: use non-deprected (and better) crypto system
var sc = simplecrypt({salt:'boopdeeboop',password:'blink1control', method:"aes-192-ecb"});


function ImapSearcher(config) {
var self = this;
Expand Down Expand Up @@ -96,7 +91,7 @@ ImapSearcher.prototype.start = function() {
var self = this;
var pass = '';
try {
pass = sc.decrypt( self.config.password );
pass = utils.decrypt( self.config.passwordHash );
} catch(err) {
log.msg('ImapSearcher: bad password');
}
Expand Down

0 comments on commit 7482746

Please sign in to comment.