Skip to content

Commit bc574c2

Browse files
committed
adapt GHSA-865w-9rf3-2wh5 test for 7.x
1 parent 1154fbd commit bc574c2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sapi/fpm/tests/log-bwp-msg-flush-split-sep-pos-end.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ $tester = new FPM\Tester($cfg, $code);
3030
$tester->start();
3131
$tester->expectLogStartNotices();
3232
$tester->request()->expectEmptyBody();
33-
$tester->expectLogLine(str_repeat('a', 1013) . "Quarkslab", decorated: false);
34-
$tester->expectLogLine("Quarkslab", decorated: false);
33+
$tester->expectLogLine(str_repeat('a', 1013) . "Quarkslab", true, false);
34+
$tester->expectLogLine("Quarkslab", true, false);
3535
$tester->terminate();
3636
$tester->expectLogTerminatingNotices();
3737
$tester->close();

sapi/fpm/tests/log-bwp-msg-flush-split-sep-pos-start.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ $tester = new FPM\Tester($cfg, $code);
3030
$tester->start();
3131
$tester->expectLogStartNotices();
3232
$tester->request()->expectEmptyBody();
33-
$tester->expectLogLine(str_repeat('a', 1009) . "Quarkslab", decorated: false);
34-
$tester->expectLogLine("Quarkslab", decorated: false);
33+
$tester->expectLogLine(str_repeat('a', 1009) . "Quarkslab", true, false);
34+
$tester->expectLogLine("Quarkslab", true, false);
3535
$tester->terminate();
3636
$tester->expectLogTerminatingNotices();
3737
$tester->close();

sapi/fpm/tests/tester.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ class Tester
13151315
* @param string $message
13161316
* @return bool
13171317
*/
1318-
public function expectLogLine(string $message, bool $is_stderr = true)
1318+
public function expectLogLine(string $message, bool $is_stderr = true, bool $decorated = true)
13191319
{
13201320
$messageLen = strlen($message);
13211321
$limit = $messageLen > 1024 ? $messageLen + 16 : 1024;
@@ -1325,7 +1325,7 @@ class Tester
13251325
$this->message("LOG LINE: " . ($logLines[0] ?? ''));
13261326
}
13271327

1328-
return $this->logTool->checkWrappedMessage($logLines, false, true, $is_stderr);
1328+
return $this->logTool->checkWrappedMessage($logLines, false, $decorated, $is_stderr);
13291329
}
13301330

13311331
/**

0 commit comments

Comments
 (0)