Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Patch for ProxyConnect problems

edited November 2010 in Vanilla 2.0 - 2.8
Hi,

Here is the solution to the problems with ProxyConnect 1.8.4:

The bug causes the first 4 characters of the SSO response to be discarded. If your SSO response starts at the exact beginning of the http body, you'll have a problem.

File: /vanilla/library/core/functions.general.php
(Note this is part of Vanilla core, the ProxyConnect plugin uses it.)

Around line Line 1250 of Vanilla release 2.0.14
if (!$Success)
return $Response;

Change to:
if ($Success)
return $Response;

The reason this bug didn't affect everybody:
If your SSO response started later on in the http body, then the omission of the first 4 characters wouldn't affect you.

My thanks to the Vanilla sw developers for some great sw! I've just started using it and am very pleased with it.

Regards,

Larry

Comments

  • Thanks very much for this instructive answer Larry. The problem still persists in Vanilla 2.015, this time in line 1254. Following your instructions, proxyconnect works as expected also in 2.015.

    Regards Susanne
  • I try to do this with Vanilla 2.0.16, and it works if the one registering and loging in are ONLY USERS/subscribers,

    when I log into my ADMIN account, vanilla just redirects me to it's /index.php,


    so I guess this only works on the user side of things. ^_^
  • edited January 2011
    here's what I did in Vanilla 2.0.16 works now, for users and for administrators...

    REPLACE the line in 1254 which is:

    if (!$Success)
    return $Response;

    with this:


    $Db = Gdn::Database();

    /*
    checks to see if the incoming email is an admin or not.
    */
    $UserEmail = substr($Response,28,-49);
    $DS = $Db->Query("select Admin from gdn_user where Email = '" . $UserEmail . "'")->Value('Admin');
    if($DS['Admin'] == 1){
    if (!$Success)
    return $Response;
    } else{
    if ($Success)
    return $Response;
    }

    Hope this helps. ^_^
  • Hi,

    Around line Line 1250 of Vanilla release 2.0.14
    if (!$Success)
    return $Response;

    Change to:
    if ($Success)
    return $Response;

    Thank you so much !!!!!!!!!!! I could not resolve the issue for two days. Vanilla is now working with Drupal.

    Thank you! Greetings from Russia!

  • Man I tried editing the specified file and I still get this

    "The "Gdn_PluginManager" object does not have a "xAvailablePluginFolders" method." LOCATION: / .... etc


    :(
  • lucluc ✭✭
    The latest ProxyConnect requires 2.0.18 beta.
  • The latest ProxyConnect requires 2.0.18 beta.
    And still does not work with ProxyConnect Manual.
  • Does anyone know if it is possible to apply this patch to the SaaS version of Vanilla? We are on Version 2.0.18b3 of Vanilla, and we are using the ProxyConnect that came bundled with the package.
  • ToddTodd Vanilla Staff
    @AndyA, we'll get this sorted out ASAP.
Sign In or Register to comment.