mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
added oauth refresh token support
This commit is contained in:
@@ -41,13 +41,20 @@ module.exports = function(ws, req) {
|
||||
? config.max_downloads
|
||||
: config.anon_max_downloads;
|
||||
|
||||
if (config.fxa_required && !user) {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
error: 401
|
||||
})
|
||||
);
|
||||
return ws.close();
|
||||
}
|
||||
if (
|
||||
!metadata ||
|
||||
!auth ||
|
||||
timeLimit <= 0 ||
|
||||
timeLimit > maxExpireSeconds ||
|
||||
dlimit > maxDownloads ||
|
||||
(config.fxa_required && !user)
|
||||
dlimit > maxDownloads
|
||||
) {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user