mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-08 06:04:42 +08:00
fix(deps): Replaced uuid dependency with crypto.randomUUID
This commit is contained in:
parent
2a1b34a2e4
commit
d462b5a55f
7 changed files with 1456 additions and 1378 deletions
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const { normalizeDomain } = require('../tools');
|
||||
const { v4: uuid } = require('uuid');
|
||||
const { randomUUID: uuid } = require('crypto');
|
||||
|
||||
// Unfinished challenges are deleted after this amount of time
|
||||
const DEFAULT_TTL = 2 * 3600 * 1000; // milliseconds
|
||||
|
|
|
@ -4,7 +4,7 @@ const config = require('wild-config');
|
|||
const Joi = require('joi');
|
||||
const ObjectId = require('mongodb').ObjectId;
|
||||
const mobileconfig = require('mobileconfig');
|
||||
const uuid = require('uuid');
|
||||
const { randomUUID: uuid } = require('crypto');
|
||||
const consts = require('../consts');
|
||||
const certs = require('../certs').get('api.mobileconfig');
|
||||
const tools = require('../tools');
|
||||
|
@ -515,7 +515,7 @@ module.exports = (db, server, userHandler) => {
|
|||
PayloadType: 'Configuration',
|
||||
PayloadVersion: 1,
|
||||
PayloadIdentifier: profileOpts.identifier + '.' + userData._id,
|
||||
PayloadUUID: uuid.v4(),
|
||||
PayloadUUID: uuid(),
|
||||
PayloadDisplayName: description || profileOpts.displayName,
|
||||
PayloadDescription: profileOpts.displayDescription,
|
||||
PayloadOrganization: profileOpts.organization || 'WildDuck Mail Server',
|
||||
|
@ -525,7 +525,7 @@ module.exports = (db, server, userHandler) => {
|
|||
PayloadType: 'com.apple.mail.managed',
|
||||
PayloadVersion: 1,
|
||||
PayloadIdentifier: profileOpts.identifier + '.' + userData._id,
|
||||
PayloadUUID: uuid.v4(),
|
||||
PayloadUUID: uuid(),
|
||||
PayloadDisplayName: 'Email Account',
|
||||
PayloadDescription: 'Configures email account',
|
||||
PayloadOrganization: profileOpts.organization || 'WildDuck Mail Server',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const os = require('os');
|
||||
const uuid = require('uuid');
|
||||
const { randomUUID: uuid } = require('crypto');
|
||||
const HTMLParser = require('node-html-parser');
|
||||
|
||||
function processDataUrl(element, useBase64) {
|
||||
|
@ -54,7 +54,7 @@ function preprocessHtml(html, hostname) {
|
|||
attachment.filename = filename;
|
||||
img.removeAttribute('data-filename');
|
||||
}
|
||||
attachment.cid = `${uuid.v4()}@${hostname ? hostname : 'inline'}`;
|
||||
attachment.cid = `${uuid()}@${hostname ? hostname : 'inline'}`;
|
||||
img.setAttribute('src', `cid:${attachment.cid}`);
|
||||
|
||||
attachments.push(attachment);
|
||||
|
|
|
@ -5,7 +5,7 @@ const RelaxedBody = require('nodemailer/lib/dkim/relaxed-body');
|
|||
const MessageSplitter = require('./message-splitter');
|
||||
const seqIndex = new SeqIndex();
|
||||
const GridFSBucket = require('mongodb').GridFSBucket;
|
||||
const uuid = require('uuid');
|
||||
const { randomUUID: uuid } = require('crypto');
|
||||
const os = require('os');
|
||||
const hostname = os.hostname().toLowerCase();
|
||||
const addressparser = require('nodemailer/lib/addressparser');
|
||||
|
@ -441,7 +441,7 @@ class Maildropper {
|
|||
// Check Message-ID: value. Add if missing
|
||||
let mId = envelope.headers.getFirst('message-id');
|
||||
if (!mId) {
|
||||
mId = '<' + uuid.v4() + '@' + (envelope.from.substr(envelope.from.lastIndexOf('@') + 1) || hostname) + '>';
|
||||
mId = '<' + uuid() + '@' + (envelope.from.substr(envelope.from.lastIndexOf('@') + 1) || hostname) + '>';
|
||||
|
||||
envelope.headers.remove('message-id'); // in case there's an empty value
|
||||
envelope.headers.add('Message-ID', mId);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const crypto = require('crypto');
|
||||
const { v1: uuidV1 } = require('uuid');
|
||||
const { randomUUID: uuid } = require('crypto');
|
||||
const ObjectId = require('mongodb').ObjectId;
|
||||
const Indexer = require('../imap-core/lib/indexer/indexer');
|
||||
const ImapNotifier = require('./imap-notifier');
|
||||
|
@ -1348,7 +1348,7 @@ class MessageHandler {
|
|||
hdate = idate;
|
||||
}
|
||||
|
||||
let msgid = envelope[9] || '<' + uuidV1() + '@wildduck.email>';
|
||||
let msgid = envelope[9] || '<' + uuid() + '@wildduck.email>';
|
||||
|
||||
let headers = this.generateIndexedHeaders(mimeTree.header);
|
||||
|
||||
|
|
2779
package-lock.json
generated
2779
package-lock.json
generated
File diff suppressed because it is too large
Load diff
35
package.json
35
package.json
|
@ -26,37 +26,37 @@
|
|||
"license": "EUPL-1.2",
|
||||
"homepage": "https://wildduck.email/",
|
||||
"devDependencies": {
|
||||
"ajv": "8.13.0",
|
||||
"ajv": "8.17.1",
|
||||
"chai": "4.3.10",
|
||||
"docsify-cli": "4.4.4",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-nodemailer": "1.2.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-cli": "1.4.3",
|
||||
"grunt-cli": "1.5.0",
|
||||
"grunt-eslint": "24.3.0",
|
||||
"grunt-mocha-test": "0.13.3",
|
||||
"grunt-shell-spawn": "0.4.0",
|
||||
"grunt-wait": "0.3.0",
|
||||
"imapflow": "1.0.162",
|
||||
"imapflow": "1.0.164",
|
||||
"mailparser": "3.7.1",
|
||||
"mocha": "10.4.0",
|
||||
"mocha": "10.7.3",
|
||||
"request": "2.88.2",
|
||||
"supertest": "7.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fidm/x509": "1.2.1",
|
||||
"@opensearch-project/opensearch": "2.8.0",
|
||||
"@opensearch-project/opensearch": "2.12.0",
|
||||
"@phc/pbkdf2": "1.1.14",
|
||||
"@postalsys/vmc": "1.0.8",
|
||||
"@root/acme": "3.1.0",
|
||||
"@root/csr": "0.8.1",
|
||||
"accesscontrol": "2.2.1",
|
||||
"axios": "1.6.8",
|
||||
"axios": "1.7.7",
|
||||
"base32.js": "0.1.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"bson": "6.7.0",
|
||||
"bullmq": "5.7.8",
|
||||
"bson": "6.9.0",
|
||||
"bullmq": "5.21.2",
|
||||
"fido2-lib": "3.5.3",
|
||||
"gelf": "2.0.1",
|
||||
"generate-password": "1.7.1",
|
||||
|
@ -69,14 +69,14 @@
|
|||
"ioredis": "5.4.1",
|
||||
"ipaddr.js": "2.2.0",
|
||||
"isemail": "3.2.0",
|
||||
"joi": "17.13.1",
|
||||
"joi": "17.13.3",
|
||||
"js-yaml": "4.1.0",
|
||||
"key-fingerprint": "1.1.0",
|
||||
"libbase64": "1.3.0",
|
||||
"libmime": "5.3.5",
|
||||
"libqp": "2.1.0",
|
||||
"logic-query-parser": "0.0.5",
|
||||
"mailauth": "4.6.6",
|
||||
"mailauth": "4.7.3",
|
||||
"mailsplit": "5.4.0",
|
||||
"mobileconfig": "2.4.0",
|
||||
"mongo-cursor-pagination": "8.1.3",
|
||||
|
@ -85,29 +85,28 @@
|
|||
"msgpack5": "6.0.2",
|
||||
"node-forge": "1.3.1",
|
||||
"node-html-parser": "6.1.13",
|
||||
"nodemailer": "6.9.13",
|
||||
"nodemailer": "6.9.15",
|
||||
"npmlog": "7.0.1",
|
||||
"openpgp": "5.11.1",
|
||||
"openpgp": "5.11.2",
|
||||
"pem-jwk": "2.0.0",
|
||||
"punycode.js": "2.3.1",
|
||||
"pwnedpasswords": "1.0.6",
|
||||
"qrcode": "1.5.3",
|
||||
"qrcode": "1.5.4",
|
||||
"restify": "11.1.0",
|
||||
"restify-cors-middleware2": "2.2.1",
|
||||
"restify-errors": "8.0.2",
|
||||
"restify-logger": "2.0.1",
|
||||
"restifyapigenerate": "1.2.1",
|
||||
"search-string": "3.1.0",
|
||||
"restifyapigenerate": "1.2.2",
|
||||
"search-string": "4.0.0",
|
||||
"seq-index": "1.1.0",
|
||||
"smtp-server": "3.13.4",
|
||||
"smtp-server": "3.13.6",
|
||||
"speakeasy": "2.0.0",
|
||||
"undici": "5.28.4",
|
||||
"unix-crypt-td-js": "1.1.4",
|
||||
"unixcrypt": "1.2.0",
|
||||
"uuid": "9.0.1",
|
||||
"wild-config": "1.7.1",
|
||||
"yargs": "17.7.2",
|
||||
"zone-mta": "3.9.6"
|
||||
"zone-mta": "3.10.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
Loading…
Add table
Reference in a new issue