Skip to content

Offline screenshots are not attached for users with ID 10 or higher #420

Closed

Description

@amazing-cat

Summary

Offline screenshots are never attached for users with ID 10 or higher.

Details

uploadOfflineScreenshots (app/Http/Controllers/Api/IntervalController.php) takes the user ID from the screenshot file name <user_id>_<screenshot_uuid> with Str::of($path)->match('/\d_.+/'). The pattern matches only the last digit before _, so 57_<uuid> is parsed as user 7; the interval lookup by user_id + screenshot_id then finds nothing and the screenshot is reported as not attached (or, if user 7 exists and owns that screenshot id, attached to the wrong user).

Acceptance criteria

  • File names are parsed as ^(\d+)_(<uuid>)$ on the base name; anything else is rejected as a wrong file name.
  • Tests cover single- and multi-digit user IDs.

Activity

  1. added this to the 4.1.0 milestone on Oct 25, 2026
  2. added theissue type on Oct 25, 2026
  3. added 4 commits that reference this issue on Oct 25, 2026
    af71e2d
    21ac75d
    33aae45
    0a0149e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phpPull requests that update Php code

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions