bugfix: APPRISE_ATTACH_SIZE correctly manages attachment size (#177)

This commit is contained in:
Chris Caron
2024-03-13 08:47:00 -04:00
committed by GitHub
parent 6e29103046
commit 4bf5093d8f
4 changed files with 17 additions and 20 deletions

View File

@@ -629,11 +629,11 @@ class NotifyView(View):
attach = parse_attachments(
content.get('attachment'), request.FILES)
except (TypeError, ValueError):
except (TypeError, ValueError) as e:
# Invalid entry found in list
logger.warning(
'NOTIFY - %s - Bad attachment specified',
request.META['REMOTE_ADDR'])
'NOTIFY - %s - Bad attachment: %s',
request.META['REMOTE_ADDR'], str(e))
return HttpResponse(
_('Bad attachment'),
@@ -1177,11 +1177,11 @@ class StatelessNotifyView(View):
attach = parse_attachments(
content.get('attachment'), request.FILES)
except (TypeError, ValueError):
except (TypeError, ValueError) as e:
# Invalid entry found in list
logger.warning(
'NOTIFY - %s - Bad attachment specified',
request.META['REMOTE_ADDR'])
'NOTIFY - %s - Bad attachment: %s',
request.META['REMOTE_ADDR'], str(e))
return HttpResponse(
_('Bad attachment'),