mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #523] CSRF problem with discord integration #381
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#381
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrSuicideParrot on GitHub (Jun 3, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/523
I'm running the self-hosted version of healthchecks (v1.20.0 in a container) and I've been having a problem configuring the discord integration.
Basically, when I'm configuring the discord app and filled my Redirect URI, a bot from discord tries to contact my server on the endpoint I specified (SITE_ROOT/integrations/add_discord/), but my server answers with 403, due to the CSRF verification (error below).
I analysed the post request from discord, and of course, they don't send any Referer header.
Is this an error of my configuration? Or should CSRF not be enabled in this endpoint?
@cuu508 commented on GitHub (Jun 4, 2021):
In the Discord app, did you set the "Interactions Endpoint URL"?
The redirect URL (
https://yourserver/integrations/add_discord/) should go in OAuth2 > Redirects field:PS. There's currently a separate issue with Discord, at least for me on the hosted service at https://healthchecks.io. The issue is with the OAuth2 flow for setting up webhooks. In the last step where the client exchanges access token for the webhook URL, Discord returns a JSON document with the "url" field absent. I'm following up with Discord support about it.
@MrSuicideParrot commented on GitHub (Jun 4, 2021):
I was putting the url in interactions endpoint and not in the Oauth2 tab. Sorry to bother you with this.
In regards to the other bug, I think the self-hosted version is also affected, because I now having an error 500 when I try to test the integration. But when I debug the error, I'll let you know.
@MrSuicideParrot commented on GitHub (Jun 4, 2021):
I think this is the error you were talking about...
@cuu508 commented on GitHub (Jun 4, 2021):
Yep, that's the one. Discord doesn't return the "url" field. Not yet sure why, I opened a support ticket with Discord, they've escalated to their dev team, but no updates yet...
The absent "url" field is a recent thing, started 2 days ago.
@cuu508 commented on GitHub (Jun 4, 2021):
Related discussion in discord-api-docs: https://github.com/discord/discord-api-docs/issues/3057