GenerateFancyCaptchas: Use Shell::params() instead of ::unsafeParams()

::unsafeParams() is for when the params are raw strings while we turned
these into proper array which means they need proper quoting while being
appended to the main bash command.

Follows-Up: Iae3fdea224d896c1a7b53ce1fe7d849cb35a0401
Change-Id: I7b71c2f6b1bf05a4f00f2367a795db093dc00867
This commit is contained in:
Amir Sarabadani 2024-01-19 14:54:59 +01:00 committed by Reedy
parent ed2e1f4421
commit 7a45d6c6d5

View file

@ -124,9 +124,8 @@ class GenerateFancyCaptchas extends Maintenance {
$this->output( "Generating $countGen new captchas.." );
$captchaTime = -microtime( true );
$result = Shell::command( [] )
->unsafeParams( $cmd )
->params( $cmd )
->limits( [ 'time' => 0 ] )
->restrict( Shell::RESTRICT_NONE )
->execute();
if ( $result->getExitCode() != 0 ) {
$this->output( " Failed.\n" );