mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-10 07:39:57 +00:00
2705abf7f3
Rendering a CITATION.cff could use memory far out of proportion to the file, as every YAML alias copies its target into the formatted citation and the parser copies `%TAG` prefixes into every node. Files past these limits show no citation, like unparseable ones do today. - Skip files over 256 KiB, largest real-world file found is 80 KiB - Skip files with `%TAG` directives - Skip files whose aliases add more than 64 Ki nodes and value bytes - Skip self-referencing anchors, except a sequence listing itself Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>