Remove obsolete anonymous limits

Related to https://gitlab.com/timvisee/send/-/issues/3
This commit is contained in:
timvisee 2021-04-12 15:19:02 +02:00
parent 9e4c063749
commit 15d37da667
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
5 changed files with 7 additions and 39 deletions

View file

@ -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(