Skip to content

markup: never read server files when rendering Org-mode - #8484

Merged
unknwon merged 2 commits into
mainfrom
ghsa-hr26-3fq5-9365
Nov 11, 2026
Merged

unknwon merged 2 commits into
mainfrom
ghsa-hr26-3fq5-9365

Conversation

@unknwon

@unknwon unknwon commented Nov 11, 2026

Copy link
Copy Markdown
Member

Describe the pull request

Disable reading files from the server when rendering Org-mode content, so that #+INCLUDE and #+SETUPFILE in a repository file can no longer pull in files from the server's file system. The rest of the Org-mode content renders as before.

Link to the issue: GHSA-hr26-3fq5-9365

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

  • go test ./internal/markup/ -run TestRawOrgMode_Include, which fails without the fix.
  • With a committed .org file including a file outside every repository and the server's app.ini, before the fix an anonymous visitor viewing the file sees both contents, including SECRET_KEY. After the fix neither appears, and the headings of the same file still render.

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 added this to the 0.14.4 milestone Nov 11, 2026
@unknwon
unknwon merged commit 3c79672 into main Nov 11, 2026
11 checks passed
@unknwon
unknwon deleted the ghsa-hr26-3fq5-9365 branch November 11, 2026 14:33
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