issue88094-fix.diff

filigivuji filigivuji, 2019-06-06 23:04

Download (3.24 KB)

View differences:

typo3_src-9.5.7_b/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php 2019-06-06 22:37:18.000000000 +0200
743 743
        if (empty($context['config'])) {
744 744
            throw new \RuntimeException('Empty context config section given', 1489751362);
745 745
        }
746
        if (!hash_equals(GeneralUtility::hmac(json_encode($context['config']), 'InlineContext'), $context['hmac'])) {
746
        if (!hash_equals(GeneralUtility::hmac((string)$context['config'], 'InlineContext'), (string)$context['hmac'])) {
747 747
            throw new \RuntimeException('Hash does not validate', 1489751363);
748 748
        }
749
        return $context['config'];
749
        return json_decode($context['config'], true);
750 750
    }
751 751

  
752 752
    /**
typo3_src-9.5.7_b/typo3/sysext/backend/Classes/Controller/SiteInlineAjaxController.php 2019-06-06 22:37:23.000000000 +0200
380 380
        if (empty($context['config'])) {
381 381
            throw new \RuntimeException('Empty context config section given', 1522771632);
382 382
        }
383
        if (!hash_equals(GeneralUtility::hmac(json_encode($context['config']), 'InlineContext'), $context['hmac'])) {
383
        if (!hash_equals(GeneralUtility::hmac((string)$context['config'], 'InlineContext'), (string)$context['hmac'])) {
384 384
            throw new \RuntimeException('Hash does not validate', 1522771640);
385 385
        }
386
        return $context['config'];
386
        return json_decode($context['config'], true);
387 387
    }
388 388

  
389 389
    /**
typo3_src-9.5.7_b/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php 2019-06-06 22:03:49.000000000 +0200
176 176
            'table' => $foreign_table,
177 177
            'md5' => md5($nameObject)
178 178
        ];
179
        $configJson = json_encode($config);
179 180
        $this->inlineData['config'][$nameObject . '-' . $foreign_table] = [
180 181
            'min' => $config['minitems'],
181 182
            'max' => $config['maxitems'],
......
185 186
                'uid' => $top['uid']
186 187
            ],
187 188
            'context' => [
188
                'config' => $config,
189
                'hmac' => GeneralUtility::hmac(json_encode($config), 'InlineContext'),
189
                'config' => $configJson,
190
                'hmac' => GeneralUtility::hmac($configJson, 'InlineContext'),
190 191
            ],
191 192
        ];
192 193
        $this->inlineData['nested'][$nameObject] = $this->data['tabAndInlineStack'];