Skip to content

Commit e1c8544

Browse files
committed
Fixed an RCE vulnerability
1 parent 31c8d3e commit e1c8544

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Craft CMS 3.x
22

3+
## Unreleased
4+
5+
- Fixed an RCE vulnerability.
6+
37
## 3.9.14 - 2024-12-19 [CRITICAL]
48

59
- Fixed an RCE vulnerability.

src/controllers/AssetsController.php

+3
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,9 @@ public function actionGenerateTransform(int $transformId = null): Response
11971197
} else {
11981198
$assetId = $this->request->getRequiredBodyParam('assetId');
11991199
$handle = $this->request->getRequiredBodyParam('handle');
1200+
if (!is_string($handle)) {
1201+
throw new BadRequestHttpException('Invalid transform handle.');
1202+
}
12001203
$assetModel = Craft::$app->getAssets()->getAssetById($assetId);
12011204
if ($assetModel === null) {
12021205
throw new BadRequestHttpException('Invalid asset ID: ' . $assetId);

0 commit comments

Comments
 (0)