[BUGFIX] Cast file resource pointer in UploadFileReferenceConverter 68/58868/3
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 7 Nov 2018 21:39:40 +0000 (22:39 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 19 Nov 2018 07:52:11 +0000 (08:52 +0100)
The return value of the hmac check is a string and must be casted to
an integer as the method using the value requires an integer.

Resolves: #86878
Releases: master, 8.7
Change-Id: Ic6db911c213eb668141ba0c849ff8a627a6f94dc
Reviewed-on: https://review.typo3.org/58868
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php

index 36b8cd2..df4a1ec 100644 (file)
@@ -216,7 +216,7 @@ class UploadedFileReferenceConverter extends AbstractTypeConverter
         }
 
         $resourcePointer = isset($uploadInfo['submittedFile']['resourcePointer']) && strpos($uploadInfo['submittedFile']['resourcePointer'], 'file:') === false
-            ? $this->hashService->validateAndStripHmac($uploadInfo['submittedFile']['resourcePointer'])
+            ? (int)$this->hashService->validateAndStripHmac($uploadInfo['submittedFile']['resourcePointer'])
             : null;
 
         $fileReferenceModel = $this->createFileReferenceFromFalFileObject($uploadedFile, $resourcePointer);