Opened 4 years ago
Closed 3 years ago
#10665 closed defect (bug) (fixed)
Protect XMLRPC against failures when WP_DEBUG enabled
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | XML-RPC | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | jalkut@… |
Description
Further protections for xmlrpc.php to guard against errors that are printed when WP_DEBUG is enabled.
The attached patch protects against failures that occur when the optional parameters for enclosures, categories, and ping urls are omitted by the client.
Attachments (2)
Change History (10)
comment:1
redsweater
— 4 years ago
- Cc jalkut@… added
- Component changed from General to XML-RPC
- Owner set to josephscott
redsweater
— 4 years ago
comment:2
redsweater
— 4 years ago
comment:5
nacin
— 3 years ago
- Keywords needs-refresh added; has-patch removed
- Milestone changed from Awaiting Triage to 3.1
comment:7
westi
— 3 years ago
- Owner changed from josephscott to westi
I'll look into getting these committed
comment:8
automattor
— 3 years ago
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
I altered the patch to be especially careful that the variables being initialized are set to the same default values they would have received previously. In particular, the problematic array lookups yield initial values of NULL, which I now set explicitly as the fallback value in case the array items don't exist.
I switched from using "!empty" to "isset", so that the logic is identical to before: if the array element is set at all, it is used to initialize the variable. If it's not set, then NULL is used. For categories, an empty array is the default initialized value, which matches previous behavior as well.