Replies: 3 comments 1 reply
-
If you have a server that is parsing foreign, user generated content dynamically, I would not enable snippets. They could specify paths on your server to get access to an unintentional file to render them, like a password file, etc. Now, this is also why we added extra security to prevent relative or absolute paths that escape the specified base path via GHSA-jh85-wwv9-24hv. Even with this "fix" in place, I would still not expose such on a live server with foreign user input, but it should be safer. Snippets is not designed or intended to parse unknown, uncontrolled inputs. Snippets is meant for generating known, safe content. If you do otherwise, you do so at your own risk. |
Beta Was this translation helpful? Give feedback.
-
Thanks @facelessuser . Does input from search count as "foreign user generated content"? I suspect in my particular case there's going to be no significant risk as the site is being served up from GitHub Pages with a custom domain where there's nothing confidential/login related on the entire domain, but would be good to understand about what exactly counts. |
Beta Was this translation helpful? Give feedback.
-
Perfect, that clears up my confusion! Thank you! Yes, my search is simply regular user queries about documents and it is not involved in creating any markdown that gets parsed. |
Beta Was this translation helpful? Give feedback.
-
Regarding snippets, there's a warning in the docs that mentions that snippets should "not be used for user facing sites that take and parse user content dynamically."
https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
Could anyone clarify regarding what counts as parsing user content in this context?
Does this cover sites that offer search (ie where users type in text)?
Thanks in advance!
Neil
Beta Was this translation helpful? Give feedback.
All reactions