Repository navigation
Commit c01f0ec
fix: harden unserialize() against PHP object injection
Add array( 'allowed_classes' => false ) to every raw unserialize() of
chart post_content / fetched source content, preventing PHP object
injection when combined with the broken access control write path.
Sinks fixed:
- classes/Visualizer/Source/Csv/Remote.php:77 (issue #596)
- classes/Visualizer/Module/Chart.php:1339 (issue #596)
- classes/Visualizer/Module.php:796 get_chart_data()
- classes/Visualizer/Module/Utility.php:437 pie/polarArea colors
- classes/Visualizer/Gutenberg/Block.php:310 block render
Behavior-preserving: all sinks expect a plain array. The last three are
the same sink class found in passing, hardened for defence-in-depth.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 6bad282 commit c01f0ec
5 files changed
Lines changed: 6 additions & 6 deletions
File tree
- classes/Visualizer
- Gutenberg
- Module
- Source/Csv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
796 | | - | |
| 796 | + | |
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
1339 | | - | |
1340 | | - | |
| 1339 | + | |
| 1340 | + | |
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments