Skip to content

Commit

Permalink
Merge pull request #11590 from nextcloud/fix/noid/bot-header-document…
Browse files Browse the repository at this point in the history
…ation

Fix order of how the HMAC is calculated for bots
  • Loading branch information
nickvergessen authored Feb 14, 2024
2 parents 6eb02c5 + 3cb7fd1 commit 283fc97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/bots.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Webhook based bots are available with the Nextcloud 27.1 compatible Nextcloud Ta
## Receiving chat messages

Messages are signed using the shared secret that is specified when installing a bot on the server.
Create a HMAC with SHA256 over the request body and the `RANDOM` header using the shared secret.
Create a HMAC with SHA256 over the `RANDOM` header and the request body using the shared secret.
Only when the `SIGNATURE` matches the request should be accepted and handled.

**Sample PHP code:**
Expand Down

0 comments on commit 283fc97

Please sign in to comment.