Resources edit page throws a "Fatal error: Unsupported operand types in /data/aegir/7.0/includes/form.inc on line 1682" when some form of authentication is enabled.

This appears to be due to services_auth_invoke() returning "TRUE" when invoking 'controller_settings' on an authentication module that doesn't implement it.

foreach ($endpoint->authentication as $auth_module => $auth_settings) {
      $settings_form = services_auth_invoke($auth_module, 'controller_settings', $auth_settings, $rop, $endpoint, $class, $name);
      //************* This is never empty due to services_auth_invoke() returning TRUE   ********************
      if (!empty($settings_form)) {
        $settings[$auth_module] = $settings_form;
      }
    }

Implications may be too wide ranging to propose a solution, from having services_auth_invoke() return FALSE, to updating the hook_services_authentication_info() requirements.

CommentFileSizeAuthor
#1 1081772.patch1.49 KBgdd

Comments

gdd’s picture

StatusFileSize
new1.49 KB

The attached patch addresses this problem. It changes the services_auth_invoke to return nothing if there is no auth settings form, and it provides a message as well in this case. I am actually unsure of the greater implications of this patch (if any) so I'd like voxpelli to look at it before I commit it. We definitely should be able to have auth plugins that don't require any settings. All tests pass but this is really not a surprise since none of our tests require an auth plugin.

voxpelli’s picture

Subscribing to take a look at this

kylebrowning’s picture

Status: Active » Closed (duplicate)

Semi duplicate of, #1036758: Cannot remove/uncheck previously set authentication for endpoint

THis should be fixed in that patch