Commit 3a0d1e4
committed
Collaboration: Harden storage layer and REST schema
- Document intentional omission of hooks/filters in storage class
(polling frequency makes hook overhead unacceptable)
- Document capability model in check_permissions: access follows
existing edit capabilities, no dedicated collaborate cap
- Replace current_time('mysql', true) with gmdate() in storage
to match cron cleanup and avoid pre_get_current_time filter drift
- Include $wpdb->last_error in storage failure WP_Error responses
so DB-level failures are diagnosable without SAVEQUERIES
- Add maxLength (1 MB) to the update data field in REST schema
to prevent unbounded payloads on a high-frequency endpoint
- Fix missing period in permission error message1 parent 80ed666 commit 3a0d1e4
2 files changed
Lines changed: 25 additions & 7 deletions
File tree
- src/wp-includes/collaboration
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
269 | | - | |
| 273 | + | |
270 | 274 | | |
271 | 275 | | |
272 | 276 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
| |||
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
198 | | - | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
| 455 | + | |
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
453 | 463 | | |
454 | 464 | | |
455 | 465 | | |
| |||
501 | 511 | | |
502 | 512 | | |
503 | 513 | | |
| 514 | + | |
504 | 515 | | |
505 | 516 | | |
506 | 517 | | |
507 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
508 | 522 | | |
509 | 523 | | |
510 | 524 | | |
| |||
0 commit comments