New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ptorx-server

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ptorx-server - npm Package Compare versions

Comparing version 6.6.1 to 6.7.0

db/upgrade/6.7.0.sql

6

__tests__/mail.ts

@@ -129,8 +129,5 @@ import 'lib/tests/prepare';

from: 'user@example.com',
headers: null,
html: null,
subject: 'subject',
raw: 'raw',
to: `user@${process.enve.DOMAIN}`,
text: null
to: `user@${process.enve.DOMAIN}`
};

@@ -407,3 +404,2 @@ expect(message).toMatchObject(_message);

from: 'test@example.com',
text: 'Hello World',
to: alias.fullAddress

@@ -410,0 +406,0 @@ },

@@ -46,3 +46,3 @@ import 'lib/tests/prepare';

);
expect(Object.keys(message).length).toBe(14);
expect(Object.keys(message).length).toBe(11);
expect(message.id).toBeNumber();

@@ -119,3 +119,2 @@ expect(message.created).toBeNumber();

const unexpiredMessage = await getMessage(messages[0].id, 1234);
unexpiredMessage.attachments = [];
const expiredMessage = await addMessage(unexpiredMessage, 1234);

@@ -122,0 +121,0 @@ const db = new MySQL();

@@ -8,3 +8,3 @@ import 'lib/tests/prepare';

import { signJWT } from 'lib/jwt/sign';
import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { Ptorx } from 'types/ptorx';

@@ -11,0 +11,0 @@

@@ -5,3 +5,3 @@ import 'lib/tests/prepare';

import { getUser } from 'lib/users/get';
import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { Ptorx } from 'types/ptorx';

@@ -8,0 +8,0 @@

@@ -22,3 +22,2 @@ export * from './users/get';

export * from './messages/send';
export * from './messages/attachment';

@@ -25,0 +24,0 @@ export * from './payments/finish';

@@ -16,3 +16,2 @@ import * as Express from 'express';

router.post('/messages/reply', c.api_replyToMessage);
router.get('/messages/attachment', c.api_getMessageAttachmentBin);

@@ -19,0 +18,0 @@ router.get('/filters', c.api_getFilters);

@@ -1,2 +0,2 @@

import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { MySQL } from 'lib/MySQL';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { MySQL } from 'lib/MySQL';

@@ -3,0 +3,0 @@

@@ -0,3 +1,3 @@

import { Ptorx } from 'types/ptorx';
import { MySQL } from 'lib/MySQL';
import { Ptorx } from 'types/ptorx';

@@ -27,13 +27,2 @@ export async function getMessage(

if (!message.raw) {
message.headers = JSON.parse(message.headers || '[]');
message.attachments = await db.query(
`
SELECT id, filename, contentType, size
FROM message_attachments WHERE messageId = ?
`,
[messageId]
);
}
db.release();

@@ -46,24 +35,1 @@ return message;

}
export async function getMessageAttachmentBin(
messageAttachmentId: Ptorx.Message['attachments'][0]['id'],
userId: number
): Promise<Buffer> {
const db = new MySQL();
try {
const [row] = await db.query(
`
SELECT ma.content
FROM message_attachments ma
LEFT JOIN messages m ON m.id = ma.messageId
LEFT JOIN aliases a ON a.id = m.aliasId
WHERE ma.id = ? AND a.userId = ?
`,
[messageAttachmentId, userId]
);
return row.content;
} catch (err) {
db.release();
throw err;
}
}
import { getPayment } from 'lib/payments/get';
import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { Ptorx } from 'types/ptorx';

@@ -4,0 +4,0 @@ import { MySQL } from 'lib/MySQL';

@@ -7,3 +7,3 @@ import { editPayment } from 'lib/payments/edit';

import * as moment from 'moment';
import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { Ptorx } from 'types/ptorx';

@@ -10,0 +10,0 @@

import { addPrimaryEmail } from 'lib/primary-emails/add';
import { TIERS } from 'constants/tiers';
import { TIERS } from 'lib/users/tiers';
import { Ptorx } from 'types/ptorx';

@@ -4,0 +4,0 @@ import { MySQL } from 'lib/MySQL';

{
"name": "ptorx-server",
"version": "6.6.1",
"version": "6.7.0",
"description": "Send and receive mail anonymously with email forwarding and aliases through Ptorx.",

@@ -22,10 +22,10 @@ "main": "app.js",

"app-module-path": "^2.2.0",
"axios": "^0.18.0",
"axios": "^0.19.0",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.4",
"dotenv": "^8.0.0",
"ejs": "^2.6.1",
"ejs": "^2.6.2",
"enve": "^1.0.1",
"escape-string-regexp": "^2.0.0",
"express": "^4.16.4",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",

@@ -35,5 +35,5 @@ "mailparser": "^2.7.1",

"mysql": "^2.17.1",
"node-forge": "^0.8.3",
"nodemailer": "^6.1.1",
"openpgp": "^4.5.1",
"node-forge": "^0.8.4",
"nodemailer": "^6.2.1",
"openpgp": "^4.5.3",
"rword": "^3.1.1",

@@ -50,10 +50,10 @@ "sender-rewriting-scheme": "^1.0.0",

"@types/escape-string-regexp": "^2.0.1",
"@types/express": "^4.16.1",
"@types/jest": "^24.0.13",
"@types/express": "^4.17.0",
"@types/jest": "^24.0.15",
"@types/jsonwebtoken": "^8.3.2",
"@types/mailparser": "^2.4.0",
"@types/mysql": "^2.15.6",
"@types/node": "^12.0.2",
"@types/node": "^12.0.8",
"@types/node-forge": "^0.8.3",
"@types/openpgp": "^4.4.4",
"@types/openpgp": "^4.4.5",
"@types/smtp-server": "^3.5.1",

@@ -63,3 +63,3 @@ "@types/uuid": "^3.4.4",

"jest-extended": "^0.11.1",
"typescript": "^3.4.5"
"typescript": "^3.5.2"
},

@@ -66,0 +66,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc