Commit 056971c
committed
Harden reorder, save, and update against crafted payloads
- Reject duplicate item IDs in reorder tree payload (prevents cycles)
- Add visited-set guard in menus_item_can_be_enabled() parent walk
- On edit, derive category from DB not POST (prevents cross-category moves)
- Protected items cannot be re-parented via tampered form
- Wrap update helpers in try/catch so failures propagate to module errors
- Include items_protected in seed item lookup (prevents overwriting custom items)1 parent a4ef68d commit 056971c
2 files changed
Lines changed: 49 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| |||
481 | 486 | | |
482 | 487 | | |
483 | 488 | | |
484 | | - | |
485 | | - | |
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
489 | 492 | | |
490 | 493 | | |
491 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
492 | 500 | | |
493 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
494 | 504 | | |
| 505 | + | |
495 | 506 | | |
496 | 507 | | |
497 | | - | |
498 | 508 | | |
499 | 509 | | |
500 | 510 | | |
| |||
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
678 | 710 | | |
679 | 711 | | |
680 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
336 | 340 | | |
337 | 341 | | |
338 | 342 | | |
339 | | - | |
| 343 | + | |
| 344 | + | |
340 | 345 | | |
341 | 346 | | |
342 | 347 | | |
343 | | - | |
| 348 | + | |
| 349 | + | |
344 | 350 | | |
345 | 351 | | |
346 | 352 | | |
| |||
0 commit comments