Skip to content

Commit

Permalink
Slugs are not essential
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 11, 2024
1 parent 30abd32 commit 853450d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Updated Twig to 3.14. ([#15704](https://github.com/craftcms/cms/issues/15704))
- Fixed a bug where address’ Label fields were being marked as translatable. ([#15702](https://github.com/craftcms/cms/pull/15702))
- Fixed an error that could occur when saving an entry with a Matrix field, if the nested entries didn’t have slugs.
- Fixed an RCE vulnerability.

## 5.4.2 - 2024-09-06
Expand Down
2 changes: 1 addition & 1 deletion src/base/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,7 @@ protected function defineRules(): array
['slug'],
'required',
'when' => fn() => (bool)preg_match('/\bslug\b/', $this->getUriFormat() ?? ''),
'on' => [self::SCENARIO_DEFAULT, self::SCENARIO_LIVE, self::SCENARIO_ESSENTIALS],
'on' => [self::SCENARIO_DEFAULT, self::SCENARIO_LIVE],
];
$rules[] = [['uri'], ElementUriValidator::class, 'on' => [self::SCENARIO_DEFAULT, self::SCENARIO_LIVE, self::SCENARIO_ESSENTIALS]];
}
Expand Down

0 comments on commit 853450d

Please sign in to comment.