Closed
Bug 466087
Opened 16 years ago
Closed 16 years ago
Weave server does not store newly generated RSA keys
Categories
(Cloud Services :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: anant, Assigned: telliott)
Details
Attachments
(1 file)
767 bytes,
patch
|
Details | Diff | Splinter Review |
PUT requests to http://server/weave/0.3/user/keys/pubkey and http://server/weave/0.3/user/keys/privkey does not result in the storage of the keys in the DB (I'm using the SQLite backend). The PUT request contains a payload that is an array as described in the API. However, store_object() in weave_storage.inc assumes that the payload is either an object or a string and the following warning is generated: [Fri Nov 21 03:17:40 2008] [error] [client ::1] PHP Notice: Array to string conversion in /Users/anant/Code/weave/server/server/weave_storage.inc on line 437 A subsequent check on the store database reveals that the pubkey and privkey payloads are incorrectly stored as 'Array'. The fix attached adds a case where the payload is an Array and stores its JSON equivalent in the DB.
Assignee | ||
Comment 1•16 years ago
|
||
Odd. I would have expected that to decode to an object. Consolidated it down to if (is_object($payload) || is_array($payload))
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 2•16 years ago
|
||
Umm, I don't that would really work because the statement inside the if is: json_encode($payload()) "$payload()" doesn't make sense if $payload is an Array :)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 3•16 years ago
|
||
it doesn't make sense if $payload is an object, either :) It's a typo and I've pulled it. Should just be json_encode($payload)
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
Updated•15 years ago
|
QA Contact: weave → general
You need to log in
before you can comment on or make changes to this bug.
Description
•