Commit 92bf973
committed
[BUGFIX] Ensure request body is writable in ServerRequestInstruction
When deserializing a ServerRequestInstruction
from array data, the body stream was recreated
using the originally stored stream mode (e.g. "rb").
This caused a RuntimeException when attempting to
write to a read-only stream during deserialization.
This patch ensures the stream is always recreated
with mode "w+b" to allow writing. The mode is no
longer serialized via jsonSerialize, as it is
irrelevant and may cause issues on reconstruction.
This issue typically did not occur in Core usage,
as many claims (e.g. from the user management module)
are GET requests with data passed via the query string.
However, custom extensions using POST requests with
a body payload were affected.
Resolves: #107117
Releases: main, 13.4, 12.4
Change-Id: If680406a9beba1dfa99157d71aad26deafcae4a0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/90101
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oli Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oli Bartsch <bo@cedev.de>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>1 parent e93bbdf commit 92bf973
File tree
3 files changed
+61
-2
lines changed- typo3/sysext/backend
- Classes/Security/SudoMode/Access
- Tests/Functional/Security/SudoMode/Access
- Fixtures
3 files changed
+61
-2
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments