Opened 16 years ago
Closed 15 years ago
#10656 closed defect (bug) (fixed)
Creating or updating serialized custom field values via XML-RPC serializes them again
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | high |
Severity: | normal | Version: | 2.9 |
Component: | XML-RPC | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
If one creates or updates a page via XML-RPC and the page has custom fields with values that are PHP serialized strings, they will be silently corrupted by serializing them again. Other strings are unmodified.
Attachments (3)
Change History (8)
#1
@
15 years ago
- Cc xsewarx@… added
- Keywords has-patch tested added
- Priority changed from normal to high
I have faced the same problem, applied this patch and it worked very well. I will attach a python script that can be used to test this.
@
15 years ago
This script could be used to test XML-RPC functions of Wordpress, including post meta.
#2
@
15 years ago
- Keywords tested removed
Actually the patch seems not working very well, will do more tests and update later.
#3
@
15 years ago
- Keywords tested added
- Milestone changed from Unassigned to 2.9
- Version changed from 2.8.4 to 2.9
The bug is in using stripslashes and trim functions which returns strings, so they will convert any value to string (like arrays to "Array"). I have tested it with XML-RPC "metaWeblog.newPost" and worked very well.
Prevents XML-RPC server from re-serializing custom field values that are already serialized.