Show More
@@ -367,12 +367,18 b' def _runcatch(req):' | |||
|
367 | 367 | # shenanigans wherein a user does something like pass |
|
368 | 368 | # --debugger or --config=ui.debugger=1 as a repo |
|
369 | 369 | # name. This used to actually run the debugger. |
|
370 | nbargs = 4 | |
|
371 | hashiddenaccess = b'--hidden' in cmdargs | |
|
372 | if hashiddenaccess: | |
|
373 | nbargs += 1 | |
|
370 | 374 | if ( |
|
371 |
len(req.args) != |
|
|
375 | len(req.args) != nbargs | |
|
372 | 376 | or req.args[0] != b'-R' |
|
373 | 377 | or req.args[1].startswith(b'--') |
|
374 | 378 | or req.args[2] != b'serve' |
|
375 | 379 | or req.args[3] != b'--stdio' |
|
380 | or hashiddenaccess | |
|
381 | and req.args[4] != b'--hidden' | |
|
376 | 382 | ): |
|
377 | 383 | raise error.Abort( |
|
378 | 384 | _(b'potentially unsafe serve --stdio invocation: %s') |
General Comments 0
You need to be logged in to leave comments.
Login now