When a user visits my account -> edit -> authorized sites on a homesite server, an extra site is listed with a blank Realm.

Basically what's happening is everytime a site authenticates to the server a site with an empty realm is created (or updated). This patch fixes that. More details below.

When a site authorizes with the server an entry is added to openid_server_relying_party table. The user is then sent to a form that tells them they're being logged into the site and can optionally check the "Automatically send my information..." checkbox. Submitting this form calls openid_server_send, which attempts to update the relying_party table

openid_server_rp_save($uid, $edit['openid.realm'], $edit['autosubmit']);

However, $edit['openid.realm'] isn't set. This patch sets that value in the form so that empty realms aren't added to the RP table.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hadsie’s picture

Status: Active » Needs review
Chris Johnson’s picture

Status: Needs review » Needs work

We have tested this patch, and it fixes the problem of creating blank realms in the RP table -- but it does not remove existing bad entries in the RP table. It would be nice to have an update script to run this query:

db_query("DELETE FROM {openid_server_relying_party} WHERE realm = '';");
hadsie’s picture

Status: Needs work » Needs review
FileSize
1.61 KB

I've updated the patch to contain an call to 'update' in the openid_server.install that removes the blank realms.