Comments
Patch
@@ -282,14 +282,15 @@
# shenanigans wherein a user does something like pass
# --debugger or --config=ui.debugger=1 as a repo
# name. This used to actually run the debugger.
+ def unsafe():
+ msg = _('potentially unsafe serve --stdio invocation: %s')
+ raise error.Abort(msg % (stringutil.pprint(req.args),))
if (len(req.args) != 4 or
req.args[0] != '-R' or
req.args[1].startswith('--') or
req.args[2] != 'serve' or
req.args[3] != '--stdio'):
- raise error.Abort(
- _('potentially unsafe serve --stdio invocation: %s') %
- (stringutil.pprint(req.args),))
+ unsafe()
try:
debugger = 'pdb'