Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
This repository was archived by the owner on May 29, 2026. It is now read-only.

[CRITICAL] C8: PublicShareController::uploadDocument is a stub — citizen uploads silently discarded (BABS evidence lost) #641

Description

@rubenvdlinde

Severity: CRITICAL

Location: lib/Controller/PublicShareController.php:264-301, lib/Service/CaseSharingService.php:501-520

Description:
PublicShareController::uploadDocument returns {success: true, ...metadata} to the citizen's browser, but CaseSharingService::storeExternalDocument is a stub: it only logs the incoming metadata and returns the constructed metadata array. The PHP temporary file ($_FILES['file']['tmp_name']) is destroyed when the request ends. No data is written to Nextcloud Files, nor is any file attachment created in OpenRegister.

For BABS (Burgemeester en Aldershandschriften) and general case-evidence submissions this is a legally-relevant data-loss bug: citizens receive confirmation that their document was received, but the document is never accessible to medewerkers.

This is distinct from a latent feature — the endpoint is exposed in the UI as a working upload mechanism and the response explicitly claims success.

Scenario:

  1. Citizen receives a public share link for their case and uploads a document (e.g., a bezwaarschrift attachment).
  2. UI shows "Document succesvol geüpload".
  3. Medewerker opens the case — the document is not there.
  4. Deadline for processing the document passes; legal consequences for the municipality.

Suggested fix:
Until proper persistence is implemented, return HTTP 501 Not Implemented so the UI can show an accurate error message.

For proper implementation:

  • Move the uploaded file to a Nextcloud Files location (e.g., userFolder/Cases/{caseId}/external-uploads/).
  • Create an OR file-attachment record linking the file to the case object.
  • Only then return {success: true}.

Source: deep team-reviewer pass 2026-05-27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions