1
0
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:
Danny Coates 2019-03-26 09:32:44 -07:00
parent eced5be836
commit 8cf3b89f91
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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);