Skip to content

CID Validation Mismatch Issue #2601

@flowdnb

Description

@flowdnb

Description

The FileSender backend validation is failing for CIDs generated by the frontend, causing "Validate FAILING. REST data filtering failing for transfer.files.cid" errors in logs.

Environment

  • FileSender version: 3.6
  • Browser: 145.0.7632.159 arm64
  • macOS: 26.3 (25D125)

Steps to Reproduce

  1. Upload a file through the web interface
  2. Observe the logs for validation errors

Expected Behavior

The CID format generated by the frontend should match the backend validation regex pattern.

Actual Behavior

The validation fails with:

[rest:info] Validate FAILING. REST data filtering failing for transfer.files.cid

Request Payload Details

From browser developer toolbar, we see:

"cid": "file_1772723908179_41_73525_578957"

The frontend generates CIDs with format: file_{timestamp}_{filename_length}_{filesize}_
The backend expects: file_{number}_{number}_{number}_

The timestamp (1772723908179) is too large and breaks the expected 3-segment pattern.

Proposed Solution

Update the PHP regex validation in classes/rest/endpoints/RestEndpointTransfer.class.php line 565 to accommodate the 4-component CID format, or modify the frontend CID generation to match the expected backend format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix mergedA PR has been created and merged to help or address this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions