Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Feb 2011 at 17:24 UTC
Updated:
2 Mar 2011 at 23:28 UTC
Jump to comment: Most recent file
When I enable only some calls, still all possible calls from all resources get listed on system.listMethods call.
Also when I call not enabled call (node.index in test) I do not get proper error message (resource is not found or something). Server side throws PHP warning (from watchdog):
a:3:{i:0;s:163:"call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given";i:1;s:7:"Warning";i:2;a:3:{s:8:"function";s:29:"services_controller_execute()";s:4:"file";s:68:"/var/www/services/d7/sites/all/modules/services/services.runtime.inc";s:4:"line";i:131;}}
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1072844-xmlrpc-listMethods-reroll.patch | 12.33 KB | ygerasimov |
| #8 | 1072844.patch | 12.63 KB | gdd |
| #7 | 1072844-xmlrpc-listMethods-precedence.patch | 15.2 KB | ygerasimov |
| #6 | 1072844-xmlrpc-listMethods.patch | 6.51 KB | ygerasimov |
| #5 | tests-updated.patch | 607 bytes | mente |
Comments
Comment #1
ygerasimov commentedAttached test to reproduce.
Comment #2
ygerasimov commentedComment #3
ygerasimov commentedSee attached patch that fixes bug with listing all possible methods (not even enabled).
Comment #4
mente commentedUsing $_GET is not good approach. You can use server_get_info() to fetch current endpoint. See attached. Apply to your own patch
Comment #5
mente commentedAnd one more patch for tests, that will through exception, when disabled methods are listed. Apply to ygerasimov patches, as well
Comment #6
ygerasimov commented@mente thank you very much for the catch. You are completely right.
Here is patch with test. Test also shows how to log in and call method (user.index) as logged in user. Patch done with git diff --no-prefix.
In order tests to run we need to apply also patch from #1016350: Do not prefix actions in the xmlrpc server
Comment #7
ygerasimov commentedAs suggested in http://drupal.org/node/1016350#comment-4143282 adding precedence test. Patch attached.
Comment #8
gddThe patch in #7 was actually this issue combined with #1016350: Do not prefix actions in the xmlrpc server. That patch has been committed now, so here is a reroll with just the new changes. Note this still needs review and testing, i havent even run it yet. Git is causing me problems!
Comment #9
ygerasimov commentedI have changed patch adding all arguments because of #1077556: XMLRPC server. Handling arguments. All tests pass. Please review.
Comment #10
gddCommitted, thanks!