fix: provide hardened suggestion for asciidoc in config (#40641)

add a warning about the renderer command dealing with untrusted input
asciidoc mode based on:
https://docs.asciidoctor.org/asciidoctor/latest/safe-modes/

---

docs: https://gitea.com/gitea/docs/pulls/670
This commit is contained in:
TheFox0x7 authored and GitHub committed 2026-12-03 20:50:10 +00:00
1 parent a21860f90e
commit 41f571bf34
1 file changed
+3 -1
+3 -1
View File
@@ -2749,7 +2749,9 @@ LEVEL = Info
;; List of file extensions that should be rendered by an external command
;FILE_EXTENSIONS = .adoc,.asciidoc
;; External command to render all matching extensions
;RENDER_COMMAND = "asciidoc --out-file=- -"
;; The command can potentially render untrusted or malicious input, which might include arbitrary imports of other files depending on the format.
;; Importing other files and other possibly dangerous features should be disabled in the command.
;RENDER_COMMAND = "asciidoc --safe-mode=secure --out-file=- -"
;; Whether Gitea should write the content into a local temp file for the render command's input.
;; * false: the content will be passed via STDIN to the command.
;; * true: write the content into a local temp file, and pass the temp filename as argument to the command.