and also blocks evaluation of any statement containing double-underscores
(:code:`__`) as well as :code:`lambda` functions. For admins to gain access
to unsafe debugging commands, the ``.mudpy.limit.debug`` option must be
-enabled in configuration first and the service completely restarted. It
+enabled in configuration first and the service reloaded or restarted. It
should still be considered unsafe, since the engine's file handling
functions could easily alter accessible files or expressions like
``9**9**9`` could be used to hang the service for indeterminate periods.
set to false, unsafe debugging functions will be disabled. Be very
careful enabling this feature, as debugging commands may allow service
administrators to run arbitrary shell commands or modify files
-accessible to the system user underwhich the service is running.
+accessible to the system user under which the service is running.
Example::
element.update_location()
element.clean_contents()
+ # warn when debug mode has been engaged
+ if self.debug_mode():
+ pending_loglines.append((
+ "WARNING: Unsafe debugging mode is enabled!", 6))
+
# done loading, so disallow updating elements from read-only files
self.loading = False
log("Running version: %s" % universe.versions.version, 1)
log("Initial directory: %s" % universe.startdir, 1)
log("Command line: %s" % " ".join(sys.argv), 1)
- if universe.debug_mode():
- log("WARNING: Unsafe debugging mode is enabled!", 6)
# pass the initialized universe back
return universe