Steam Authentication & Integration

Steam Authentication & Integration 1.6.3

No permission to download
So I tried to associate my account with Steam. Pressed the Log In button on the Steam authorisation page and got this error:
AVForums
Server Error
file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration

  1. XenForo_Application::handlePhpError()
  2. file_get_contents() in Steam/ControllerPublic/Register.php at line 593
  3. Steam_ControllerPublic_Register->_validate() in Steam/ControllerPublic/Register.php at line 40
  4. Steam_ControllerPublic_Register->actionSteam() in XenForo/FrontController.php at line 337
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  6. XenForo_FrontController->run() in /home/sites/xf.avforums.com/public_html/sandbox/index.php at line 13
We have the file-get-contents function disabled because it poses a security threat.
We use curl instead.
Is there any way round this problem please?
 
Thank you.
I wrote an addon for vBulletin which stored peoples' xbox gamercard information locally.
For those people who entered their gamer tags in a custom field of their profile, it displayed their card instead of their avatar in the xbox gaming forums.
It cached their data for 24 hours and then if one of their messages was displayed in the forums, the data was asynchronously read in. I added a small 'refresh' button which displayed the last updated datetime as a tooltip and refreshed the gamercard in place when clicked.
Have you considered replacing a users' avatar in specific forums in this way?

Still trying to think how I will go about the Xenforo Avatar / Steam Avatar refresh. Ideally I'd like a way to check that the avatar hasn't changed on Steam compared to XenForo. My only concern is for people who change their avatar on XenForo and having it be overwritten by Steam.

I suppose the cop-out method would be using the SteamProfile javascript to load the avatar, that way it's always fresh. But that would require some template hacking unfortunately.

So I tried to associate my account with Steam. Pressed the Log In button on the Steam authorisation page and got this error:

We have the file-get-contents function disabled because it poses a security threat.
We use curl instead.
Is there any way round this problem please?

I'll try to get cURL implemented there and test it today.
 
Re the avatar thing, I suggest you do not overwrite the normal avatar with the Steam one, just display the Steam Avatar in the selected forums instead of the Xenforo one.
 
HowIChrgeLazer updated Steam Authentication & Integration with a new update entry:

Version 1.3.5 Changelog

* JavaScript animation tweak for SteamProfile slider (Thanks, silence!)
* Moved SteamProfile CSS to XenForo Template Manager
* Deleted unused style.css files
* Removed themes folder from JS directory, moved to styles\default\steamauth
* Removed unnecessary templates pre-loads from and fixed a bug in Listener.php
* Cleaned up ControllerPublic and Routes
* Added permissions for viewing SteamProfile banner
* Added cURL to Register.php to use first over file_get_contents()
* Compressed Javascript...

Read the rest of this update entry...
 
Please be sure to read the upgrade steps for this latest update. I have also included a NEW permission that allows you to disable/enable SteamProfile badge viewing for users/groups.
 
Installed and while the file_get_contents error has gone, I'm still getting:
AVForums - Error
Error during authentication. Please try again.
 
Installed and while the file_get_contents error has gone, I'm still getting:
AVForums - Error
Error during authentication. Please try again.

I just tested a fresh XenForo install with only this add-on, and receive the same error every time

Nothing has been logged in the server logs so can't see what the error is for :\
 
Last edited:
Installed and while the file_get_contents error has gone, I'm still getting:
AVForums - Error
Error during authentication. Please try again.

I just tested a fresh XenForo install with only this add-on, and receive the same error every time

Nothing has been logged in the server logs so can't see what the error is for :\

Is this creating a new account or integrating a current account?
 
Integrating.

Hmmm. Trying to replicate. It's working fine on 1.2.1 and 1.2.3 on my end. I've had somebody register and I just associated a test account and my admin account. No authentication errors. Also tested it on my dev 1.1.5 board, registered one account and re-associated two different accounts.

So now to find out what's different between our setups that's causing this to fail. Because you could not use file_get_contents, I implemented a cURL post to handle the validation of the OpenID when working with the steam login.

PHP:
        if((function_exists('curl_version')) && !ini_get('safe_mode') && !ini_get('open_basedir'))
        {
            $this->ch = curl_init(self::STEAM_LOGIN);
            curl_setopt($this->ch, CURLOPT_POST, true);
            curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
            curl_setopt($this->ch, CURLOPT_TIMEOUT, 6);
            curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($this->ch, CURLOPT_HEADER, false);
            curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);
            curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headercurl);
            $result = curl_exec($this->ch);
            curl_close( $this->ch );
        }
        else
        {
            $result=file_get_contents(self::STEAM_LOGIN, false, $context);
        }

        // Validate wheather it's true and if we have a good ID
        preg_match("#^http://steamcommunity.com/openid/id/([0-9]{17,25})#", $_GET['openid_claimed_id'], $matches);
        $steamID64 = is_numeric($matches[1]) ? $matches[1] : 0;

        // Return our final value
        return preg_match("#is_valid\s*:\s*true#i", $result) == 1 ? $steamID64 : '';

Is there anything with cURL that you see, would not operate correctly for you based on your php settings? Oh just to double check, do you have your Steam API key in?

I'm using cURL on my setup and not experiencing the error.

"Loading..." on xf 1.2.3, how to fix?
View attachment 60992

I'll need more info. Are all addon files uploaded correctly? Do you have your API key in? Is cURL enabled? Do avatars work on the steam stats page? Any errors in your logs?
 
Uploaded the files ok, steam key is in.

PHP Version 5.2.10
cURL support enabled
cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

You're welcome to check out my server. It's running on the sandbox for the moment. PC me.
 
I'll need more info. Are all addon files uploaded correctly? Do you have your API key in? Is cURL enabled? Do avatars work on the steam stats page? Any errors in your logs?

Files uploaded correctly, I have Api key, and yes curl is enabled (with SSL),avatars on steam stats doesn't works, no errors...
 
Files uploaded correctly, I have Api key, and yes curl is enabled (with SSL),avatars on steam stats doesn't works, no errors...

Do you have any sort of caching enabled that may not have loaded the new changes to the javascript? Can I see a link to your website?
 
Now showme the black space in one theme:

jQPO2PP4Gn1Yh.png


In the other dont show :(


jcjcGmoy5kakb.png
 
Top Bottom