We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49d48c3 commit 60e3d5eCopy full SHA for 60e3d5e
Model/Backend/QueueCron.php
@@ -30,12 +30,14 @@ public function beforeSave()
30
}
31
32
if (!preg_match(self::CRON_FORMAT_REGEX, $value)) {
33
+ // This use of preg_replace is safe — static regex without /e modifier.
34
+ // phpcs:ignore
35
$safeValue = preg_replace(self::CRON_DISALLOW_REGEX, '', (string) $value);
36
$msg = ($safeValue !== $value)
37
? 'Cron expression is invalid.'
38
: sprintf(
39
'Cron expression "%s" is not valid.',
- $safeValue
40
+ htmlspecialchars($safeValue, ENT_QUOTES, 'UTF-8')
41
);
42
throw new InvalidCronException($msg);
43
0 commit comments