mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
Return 400 Bad Request for signature verification errors
This commit is contained in:
parent
f247c280e9
commit
5211c64c2a
1 changed files with 3 additions and 0 deletions
|
@ -440,6 +440,9 @@ def shared_inbox():
|
||||||
return ''
|
return ''
|
||||||
except VerificationError as e:
|
except VerificationError as e:
|
||||||
activity_log.exception_message = 'Could not verify signature: ' + str(e)
|
activity_log.exception_message = 'Could not verify signature: ' + str(e)
|
||||||
|
activity_log.result = 'failure'
|
||||||
|
db.session.commit()
|
||||||
|
return '', 400
|
||||||
else:
|
else:
|
||||||
actor_name = request_json['actor'] if 'actor' in request_json else ''
|
actor_name = request_json['actor'] if 'actor' in request_json else ''
|
||||||
activity_log.exception_message = f'Actor could not be found: {actor_name}'
|
activity_log.exception_message = f'Actor could not be found: {actor_name}'
|
||||||
|
|
Loading…
Add table
Reference in a new issue