Summary: Restricting OpenID using $wgOpenIDConsumerAllow can be
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: OpenID

Picture this situation:


    # Deny all OpenIDs except the ones we allow:
    $wgOpenIDConsumerDenyByDefault = true;
    $wgOpenIDConsumerAllow = array("@^(http://)?");

Someone enters in - validation passes - all is good.

Then, then take the URL that their browser is redirected to (I used Firefox's
Live HTTP Headers plugin to see this), copy the OpenID parameters off it, and
then suffix them onto a server which they have an account on (say,

Voila, I am logged into this supposedly-restricted wiki with an OpenID that
fails the consumer allow test.

Two things come to mind here:

  - Aren't OpenID requests meant to be signed, so they can't be tampered with
in this way?
  - You should validate after the OpenID is returned, not (just) before. 

For example, I have solved this by adding to SpecialOpenIDFinish.body.php 

                         case Auth_OpenID_SUCCESS:
                                // This means the authentication succeeded.
                                $openid = $response->getDisplayIdentifier();
                                // Check we have been given an identifier we
                                if (!$this->canLogin($openid_url)) {
$wgOut->showErrorPage('openidpermission', 'openidpermissiontext');

However, I don't think this will stop a OP that is prepared to issue an ID in
any name - only signing will fix that.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to