mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 05:02:45 +01:00
increase file id to 8 bytes
This commit is contained in:
parent
eced5be836
commit
8cf3b89f91
@ -11,7 +11,7 @@ const filelist = require('./filelist');
|
||||
const clientConstants = require('../clientConstants');
|
||||
|
||||
const IS_DEV = config.env === 'development';
|
||||
const ID_REGEX = '([0-9a-fA-F]{10})';
|
||||
const ID_REGEX = '([0-9a-fA-F]{10,16})';
|
||||
|
||||
module.exports = function(app) {
|
||||
app.set('trust proxy', true);
|
||||
|
@ -8,7 +8,7 @@ const { encryptedSize } = require('../../app/utils');
|
||||
const log = mozlog('send.upload');
|
||||
|
||||
module.exports = async function(req, res) {
|
||||
const newId = crypto.randomBytes(5).toString('hex');
|
||||
const newId = crypto.randomBytes(8).toString('hex');
|
||||
const metadata = req.header('X-File-Metadata');
|
||||
const auth = req.header('Authorization');
|
||||
if (!metadata || !auth) {
|
||||
|
@ -23,7 +23,7 @@ module.exports = function(ws, req) {
|
||||
|
||||
ws.once('message', async function(message) {
|
||||
try {
|
||||
const newId = crypto.randomBytes(5).toString('hex');
|
||||
const newId = crypto.randomBytes(8).toString('hex');
|
||||
const owner = crypto.randomBytes(10).toString('hex');
|
||||
|
||||
const fileInfo = JSON.parse(message);
|
||||
|
Loading…
Reference in New Issue
Block a user