1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-25 00:38:54 -05:00

Merge pull request #111 from whiteout-io/dev/WO-555

[WO-555] Remove cleartext prefix to encrypted messages
This commit is contained in:
Andris Reinman 2014-08-27 10:06:53 +03:00
commit 1ff9f44b2d
4 changed files with 5 additions and 9 deletions

View File

@ -106,7 +106,6 @@ define(function(require) {
fallbackSubject: '(no subject)', fallbackSubject: '(no subject)',
invitationSubject: 'Invitation to a private conversation', invitationSubject: 'Invitation to a private conversation',
invitationMessage: 'Hi,\n\nI use Whiteout Mail to send and receive encrypted email. I would like to exchange encrypted messages with you as well.\n\nPlease install the Whiteout Mail application. This application makes it easy to read and write messages securely with PGP encryption applied.\n\nGo to the Whiteout Networks homepage to learn more and to download the application: https://whiteout.io\n\n', invitationMessage: 'Hi,\n\nI use Whiteout Mail to send and receive encrypted email. I would like to exchange encrypted messages with you as well.\n\nPlease install the Whiteout Mail application. This application makes it easy to read and write messages securely with PGP encryption applied.\n\nGo to the Whiteout Networks homepage to learn more and to download the application: https://whiteout.io\n\n',
message: 'Hi,\n\nthis is a private conversation. To read my encrypted message below, open it in Whiteout Mail: https://whiteout.io/#product\n\n\n',
signature: '\n\n\n--\nSent from Whiteout Mail - https://whiteout.io\n\nMy PGP key: ', signature: '\n\n\n--\nSent from Whiteout Mail - https://whiteout.io\n\nMy PGP key: ',
webSite: 'http://whiteout.io', webSite: 'http://whiteout.io',
verificationSubject: '[whiteout] New public key uploaded', verificationSubject: '[whiteout] New public key uploaded',

View File

@ -1010,7 +1010,6 @@ define(function(require) {
// mime encode, sign, encrypt and send email via smtp // mime encode, sign, encrypt and send email via smtp
self._pgpMailer.send({ self._pgpMailer.send({
encrypt: true, encrypt: true,
cleartextMessage: str.message,
smtpclient: options.smtpclient, // filled solely in the integration test, undefined in normal usage smtpclient: options.smtpclient, // filled solely in the integration test, undefined in normal usage
mail: options.email, mail: options.email,
publicKeysArmored: options.email.publicKeysArmored publicKeysArmored: options.email.publicKeysArmored

View File

@ -806,8 +806,10 @@ define(function(require) {
sinon.stub(smtpServer, 'onmail', function(mail) { sinon.stub(smtpServer, 'onmail', function(mail) {
expect(mail.from).to.equal(testAccount.user); expect(mail.from).to.equal(testAccount.user);
expect(mail.to).to.deep.equal([testAccount.user]); expect(mail.to).to.deep.equal([testAccount.user]);
expect(/^Content-Type: multipart\/mixed/.test(mail.body)).to.be.true;
expect(mail.body).to.contain('this is a private conversation'); expect(/^Content-Type: multipart\/mixed/.test(mail.body)).to.be.false;
expect(/^Content-Type: multipart\/encrypted/.test(mail.body)).to.be.true;
expect(mail.body).to.contain('LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tDQpWZXJzaW9uOiBPcGVuUEdQLmpzIHYwLjcuMg0K'); // one line of the ciphertext
}); });
emailDao.sendEncrypted({ emailDao.sendEncrypted({

View File

@ -9,9 +9,7 @@ define(function(require) {
PGP = require('js/crypto/pgp'), PGP = require('js/crypto/pgp'),
DeviceStorageDAO = require('js/dao/devicestorage-dao'), DeviceStorageDAO = require('js/dao/devicestorage-dao'),
mailreader = require('mailreader'), mailreader = require('mailreader'),
appcfg = require('js/app-config'), cfg = require('js/app-config').config,
str = appcfg.string,
cfg = appcfg.config,
expect = chai.expect; expect = chai.expect;
@ -1559,7 +1557,6 @@ define(function(require) {
pgpMailerStub.send.withArgs({ pgpMailerStub.send.withArgs({
encrypt: true, encrypt: true,
cleartextMessage: str.message,
mail: dummyMail, mail: dummyMail,
smtpclient: undefined, smtpclient: undefined,
publicKeysArmored: publicKeys publicKeysArmored: publicKeys
@ -1584,7 +1581,6 @@ define(function(require) {
pgpMailerStub.send.withArgs({ pgpMailerStub.send.withArgs({
encrypt: true, encrypt: true,
cleartextMessage: str.message,
mail: dummyMail, mail: dummyMail,
smtpclient: undefined, smtpclient: undefined,
publicKeysArmored: publicKeys publicKeysArmored: publicKeys