diff options
Diffstat (limited to 'game/core.rpy')
-rw-r--r-- | game/core.rpy | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/game/core.rpy b/game/core.rpy index 723c283..14f22c9 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -46,6 +46,13 @@ init -3 python: del ct return rt + # Sanitize a command (strip some flow control chars) + # While it covers all control operators and most metacharacters, + # it doesn't covers well the reserved words. + # ...Of course, it relies on this client not being compromised. + def san(cmd): + return cmd.replace(";", "").replace("|", "").replace(">", "").replace("<", "").replace("&", "").replace("(", "").replace(")", "").replace("\n", "").replace("[[", "").replace("]]", "") + # Smart Print command def stdout(message, bd=False): if config.developer: |