Skip to content

Commit

Permalink
Fix: Solved possible security break removing saved random number on p…
Browse files Browse the repository at this point in the history
…ublish action.
  • Loading branch information
Andres D. Molins committed Sep 14, 2023
1 parent 8387ff7 commit 33ef316
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/aleph_vrf/executor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def receive_publish(hash_message: str) -> APIResponse:
f"Random bytes not existing for execution {response_hash.execution_id}"
)

random_bytes: bytes = SAVED_GENERATED_BYTES[str(response_hash.execution_id)]
random_bytes: bytes = SAVED_GENERATED_BYTES.pop(str(response_hash.execution_id))

response_bytes = VRFRandomBytes(
request_id=response_hash.request_id,
Expand All @@ -115,6 +115,8 @@ async def receive_publish(hash_message: str) -> APIResponse:

message_hash = await publish_data(response_bytes, ref, account)



response_bytes.message_hash = message_hash

return APIResponse(data=response_bytes)
Expand Down

0 comments on commit 33ef316

Please sign in to comment.