Merge pull request #157 from eReuse/change/open-security

open of security
This commit is contained in:
cayop 2021-07-07 11:24:04 +02:00 committed by GitHub
commit 2e9437f5a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -197,11 +197,16 @@ class ActionView(View):
snapshot = SnapshotView(json, resource_def, self.schema)
return snapshot.post()
if not 'data' in json:
txt = 'Invalid snapshot'
raise ValidationError(txt)
# TODO @cayop uncomment at four weeks
# if not 'data' in json:
# txt = 'Invalid snapshot'
# raise ValidationError(txt)
snapshot_data = decode_snapshot(json)
# snapshot_data = decode_snapshot(json)
snapshot_data = json
if 'data' in json:
snapshot_data = decode_snapshot(json)
if not snapshot_data:
txt = 'Invalid snapshot'