Skip to content

Add random request ID (closes #22) #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

johannes-huther
Copy link
Contributor

Adds a random unique ID to the request.

As the POST data is never logged, this should prevent replay attacks even if logging is set to verbose.

If the randomness is not trusted an additional salt can still be added using

data: '{ "salt": "${{ secrets.WEBHOOK_SALT }}" }'

but this shouldn't be necessary.

Also the user can verify, that the request is unique by storing the previous request IDs. But I don't think this is necessary either.

Therefore I conclude that this PR closes #22.

This commit does not change the behaviour of this file.
Instead it stores the options in a variable to remove one of the two
curl blocks that have been identical for the most part.

`&> /dev/null` is not needed if `-v` is omitted  and `-s` is used.
Adds a random unique ID to the request. As the POST data is never
logged, this should prevent replay attacks even if logging is set to
verbose.
@distributhor distributhor merged commit d28f935 into distributhor:master Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent replay attacks
2 participants