mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
Remove obsolete anonymous limits
Related to https://gitlab.com/timvisee/send/-/issues/3
This commit is contained in:
@@ -2,7 +2,7 @@ const config = require('../config');
|
||||
const storage = require('../storage');
|
||||
|
||||
module.exports = function(req, res) {
|
||||
const max = req.user ? config.max_downloads : config.anon_max_downloads;
|
||||
const max = config.max_downloads;
|
||||
const dlimit = req.body.dlimit;
|
||||
if (!dlimit || dlimit > max) {
|
||||
return res.sendStatus(400);
|
||||
|
||||
@@ -30,15 +30,9 @@ module.exports = function(ws, req) {
|
||||
const metadata = fileInfo.fileMetadata;
|
||||
const auth = fileInfo.authorization;
|
||||
const user = await fxa.verify(fileInfo.bearer);
|
||||
const maxFileSize = user
|
||||
? config.max_file_size
|
||||
: config.anon_max_file_size;
|
||||
const maxExpireSeconds = user
|
||||
? config.max_expire_seconds
|
||||
: config.anon_max_expire_seconds;
|
||||
const maxDownloads = user
|
||||
? config.max_downloads
|
||||
: config.anon_max_downloads;
|
||||
const maxFileSize = config.max_file_size;
|
||||
const maxExpireSeconds = config.max_expire_seconds;
|
||||
const maxDownloads = config.max_downloads;
|
||||
|
||||
if (config.fxa_required && !user) {
|
||||
ws.send(
|
||||
|
||||
Reference in New Issue
Block a user