Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

math mode can be escaped #3

Open
jtracey opened this issue Sep 2, 2022 · 0 comments · May be fixed by #4
Open

math mode can be escaped #3

jtracey opened this issue Sep 2, 2022 · 0 comments · May be fixed by #4

Comments

@jtracey
Copy link

jtracey commented Sep 2, 2022

The module doesn't make any attempt to escape or reject $ characters. For example, !tex x $ x $ x will show the middle x as a text x, not a math x. If you enable the use_tex setting, this is a security problem (e.g., !tex $ \def\x{\x}\x $ will launch latex in an infinite loop). One of the following changes should be made:

  • reject all strings with $
  • escape all $ characters (this is trickier than it may seem, e.g. s.replace('$', '\$') would still allow an escape if s = "\$ \def\x{\x}\x \$")
  • warn about the security implications of the use_tex setting
@jtracey jtracey linked a pull request Sep 5, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant