Project

General

Profile

Actions

Bug #79999

closed

IRRE parent config in Ajax calls is broken

Added by Helmut Hummel over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2017-02-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

The code to transfer the inline parent context to form engine
in Ajax requests exists but is currently non functional in some
situations.

The config is stored as array, which is hashed by serializing the array,
and building the hash on that string. However that string is not transferred
over the wire, but the json encoded array.

If a float value was present at some place in this array, json_encode and json_decode
will add a slight offset to these numbers than if the value is serialized.


$a = [
  'value' => 1 / 3
]

var_dump(serialize($a) === serialize(json_decode(json_encode($a), true)));

This construct is never true, but is exactly how the current hmac validation works.

Instead, we must use json_encode the array and create the hash against that value, so that these floating point numbers will match.

Actions

Also available in: Atom PDF