If somebody has misspelled the provider url or just left it blank the whole module does everything as it would be correct (single sign redirection and so on). This leads to quite a lot different errors which cause is not clear to the user. Maybe we should think about a routine to verify a valid provider exists on the provided url and if not to warn the user and maybe we can avoid some of the ugly errors.

CommentFileSizeAuthor
#2 nonexistent_provider_handler.patch1.2 KBbsevere

Comments

xamanu’s picture

Title: Routine for misspelled or inexistend provider » Routine for misspelled or inexistent provider
bsevere’s picture

Status: Active » Needs review
StatusFileSize
new1.2 KB

The openid module handles this is by using the discovery process. openid_begin() does return an error when a bad provider is passed. openid_sso_relying_request() just needs a way to handle it.

This patch checks for the NULL return value and redirects the user to the front page if it occurs. It adds a watchdog entry for the admin and also replaces the error thrown by the openid module as that message would only confuse the user.

Setting to needs review...

xamanu’s picture

Status: Needs review » Fixed

Thank you! Sorry for taking so long. Committed.

xamanu’s picture

In another issue, the same problem was risen: #1868638: WSOD when Relay not set
A Drupal 6 fix was requested. So I backported it to the 6.x-1.x version and committed it.

Status: Fixed » Closed (fixed)

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