MopeSWTP-SS21 / MopeSWTP

MIT License
1 stars 0 forks source link

Sanitize user input #75

Open CSchoel opened 3 years ago

CSchoel commented 3 years ago

Maybe you should think about sanitizing your user input. One example: Using the model name Modelica);exit(1 shuts down the OMC instance. :wink:

There are all sorts of shenanigans that you can do with this, incuding executing arbitrary shell commands. This is not that big of an issue, since you can do this with Modelica code anyway, so it is safe to assume that Mo|E will only ever be used in a trusted or sandboxed context. However, you still might want to add at least an escape function so that you do not have to handle completely arbitrary responses by the OMC if the user inputs something crazy.