Skip to content
Snippets Groups Projects
Commit 982d5dcf authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Implemented security check

parent 979709f6
No related branches found
No related tags found
1 merge request!11Feature security update
......@@ -139,7 +139,16 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
continue;
}
// @TODO SECURITY CHECK WITH HASH
// get file name without folders
$pathAsArray = GeneralUtility::trimExplode('/', $pathToRegistrationFile);
$filename = $pathAsArray[\count($pathAsArray)-1];
$filenameWithoutHash = GeneralUtility::trimExplode('_', $filename)[1];
$hash = md5($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] . '|' . $filenameWithoutHash);
// if the filename doesnt start with the hash value, ignore it
if (strpos($filename, $hash) !== 0) {
continue;
}
$configArray = (include $pathToRegistrationFile);
$extensionKey = $configArray['extension_key'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment