Skip to content

attachment: only link attachments that are not yet linked elsewhere - #8480

Merged
unknwon merged 3 commits into
mainfrom
ghsa-p92p-7887-3g33
Nov 11, 2026
Merged

unknwon merged 3 commits into
mainfrom
ghsa-p92p-7887-3g33

Conversation

@unknwon

@unknwon unknwon commented Nov 10, 2026

Copy link
Copy Markdown
Member

Describe the pull request

Creating an issue, comment, or release linked any attachment UUID the user submitted, even one already linked to another repository's issue, comment, or release. Attachments are now only linked when they are not yet linked to anything.

Link to the issue: GHSA-p92p-7887-3g33

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan. (if applicable)
  • I have added an entry to CHANGELOG. (if applicable)

Test plan

On a local instance with two non-admin users, before and after the change:

  1. Submitting another user's attachment UUID when creating an issue, a comment, or a release no longer links it, and the attachment stays on the original issue or release.
  2. Attaching freshly uploaded files to a new issue, comment, and release still works.
  3. Editing a release keeps its existing attachments.

AI usage

Claude Code was used to verify the report, write the fix, and run the end-to-end checks above, all reviewed by the maintainer.

@unknwon
unknwon merged commit 6fa95b4 into main Nov 11, 2026
11 checks passed
@unknwon
unknwon deleted the ghsa-p92p-7887-3g33 branch November 11, 2026 02:15
@unknwon unknwon added this to the 0.14.4 milestone Nov 11, 2026
unknwon added a commit that referenced this pull request Nov 11, 2026
@unknwon unknwon mentioned this pull request Nov 11, 2026
4 of 6 tasks
appthin added a commit to appthin/gogs-plus that referenced this pull request Nov 12, 2026
Brings in the 0.14.4 security and bug fixes (gogs#8439, gogs#8472, gogs#8478, gogs#8480-gogs#8484,
gogs#8486, gogs#8488), the Highlights-based diff highlighter for the web UI (gogs#8492,
gogs#8434, gogs#8435), absolute entrypoint paths for the SPA shell (gogs#8447), Docker
workflow updates (gogs#8463, gogs#8475), and housekeeping.

Fork-specific code is preserved: CodeQL workflow, login bans, sign-in
protection, the -plus release pipeline, and the rewritten README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant