Raise error on invalid backup key

This commit is contained in:
Tanner Collin 2021-09-08 18:41:31 +00:00
parent feff5914ff
commit 7aebffa329

View File

@ -649,6 +649,8 @@ class BackupView(views.APIView):
cache.set(backup_user['name'], datetime.datetime.now())
return redirect(backup_url)
elif auth_token:
raise exceptions.PermissionDenied()
else:
backup_stats = []
for backup_user in secrets.BACKUP_TOKENS.values():