nextcloud / nextcloud/server

`webhook_listeners` only supports events with less than 4000 characters payload due to background jobs limitation and may break a request

Open
#58,912 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 34-feedback bug feature: webhooks
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

webhook_listeners creates a background job with a payload from the webhook event.
If the payload is bigger then:

  1. Webhook is not created
  2. A request creating the event fails

background job arguments cannot exceed 4000 characters

https://github.com/nextcloud/server/blob/72c37934b777f496bf6b9bc12e5d702423a22d8a/apps/webhook_listeners/lib/Listener/WebhooksEventListener.php#L27-L60

Intermediate solution: at least wrap it into a try catch block and log the error, so failed background job creation doesn't fail the request.

A proper solution is to store the data somewhere else or add support for large data in background jobs.

cc @come-nc @artonge

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/webhook_listeners/lib/Listener/WebhooksEventListener.php at lines 27-60 and trace how the webhook event payload is passed to the background job. Verify the behavior when the payload exceeds 4000 characters. Done means oversized payloads no longer make webhook creation or the request fail, with the failure logged or the data handled by a durable alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.