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
parent 3935691f2f
commit 1e1e9e89ba

View file

@ -126,9 +126,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" );