Hello everybody.

Trying to resolve an issue where I was unable to access services of a domain through an other domain, I found that when the swf was trying to read the crossdomain.xml, it was getting an HTTP 500 error.

When reading crossdomain.xml with a browser I get this.

Fatal error: Call to undefined function services_get_keys() in sites/all/modules/services/services.module on line 144
Call Stack
#	Time	Function	Location
1	0.0010	{main}( )	..\index.php:0
2	0.6807	menu_execute_active_handler( )	..\index.php:18
3	0.6869	call_user_func_array ( )	..\menu.inc:348
4	0.6869	services_crossdomain_xml( )	..\menu.inc:0

This caused by function services_crossdomain_xml() calling a non-existent function services_get_keys(). The function should really be services_keyauth_get_keys(). I guess it is left over from a past refactoring. The attached patch fixes it.

Comments

gdd’s picture

This patch actually changes from services_keyauth_get_keys() to services_get_keys(). Isn't that backwards?

gdd’s picture

Status: Active » Needs work
ilo’s picture

As commented previously (http://drupal.org/node/477012#comment-2177558), the crossdomain.xml implementation now will break other modules because we are hijacking the URL completely.

If we are going to fix it, keep in mind a possible future redesign for this feature.

ilo’s picture

looking the patch:
+++ F:/www/t/sites/all/modules/services/services.module.orig Thu Oct 15 06:59:56 2009

Yes, the diff was done from new to original I would say.

Tri’s picture

Status: Needs work » Needs review
StatusFileSize
new572 bytes

Ooops, sorry about that... The patch rerolled in the correct way.

ilo’s picture

tri, are you using keys in your services implementation?

ilo’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new572 bytes

Heyrocker, I marked this as rtbc for now, waiting for your approval.

gdd’s picture

Status: Reviewed & tested by the community » Fixed

The keyauth module is not required, so ilo's addition of a function check makes sense. Patch committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.