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.
ProxyConnect: Accessing forum creates new user - blank name [unSOLVED]
Anyone accessing the forum is automatically logged in with blank username, userid 2 - even if they are not logged into my app. (custom using CodeIgniter framework)
My URL authenticator seems fine to me, outputs the info when they are logged in.
Have applied the patch.
Edit: This is what my URL authenticator looks like under view source when logged in:
http://farm6.static.flickr.com/5126/5227148109_d91d0dde8b.jpg
and blank when not.
I have used the php headers for the URL authenticator ouput:
header('HTTP/1.1 200 OK');
header('Content-Type: text/plain');
Have been trying for 2 days now, any ideas?
Thanks
Sam
My URL authenticator seems fine to me, outputs the info when they are logged in.
Have applied the patch.
Edit: This is what my URL authenticator looks like under view source when logged in:
http://farm6.static.flickr.com/5126/5227148109_d91d0dde8b.jpg
and blank when not.
I have used the php headers for the URL authenticator ouput:
header('HTTP/1.1 200 OK');
header('Content-Type: text/plain');
Have been trying for 2 days now, any ideas?
Thanks
Sam
Tagged:
4
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
:RAGE:
Vanilla Forums COO [GitHub, Twitter, About.me]
1. On my local home computer (with Ubuntu, Apache, PHP5, MySQL) i need to apply this patch:
http://vanillaforums.org/discussion/13698/patch-for-proxyconnect-problems
2. On my hosting server (with Debian, Nginx server, PHP5, MySQL) i do NOT need this patch.
This is because on my local computer my Authenticate URL returns information without any headers and I have different behavior on my hosting (some headers returned before user data).
So, when we are not logged in to the site, and we are accessing to Authenticate URL we should get empty result, but there are some pre-headers like this:
[HTTP/1.1 200 OK] =>
[Date: Fri, 17 Dec 2010 13:10:08 GMT] =>
[Server: Apache/2.2.3 (Debian)] =>
[X-Powered-By: PHP/5.2.0-8 etch16] =>
[Expires: Thu, 19 Nov 1981 08:52:00 GMT] =>
...
If we apply the patch (http://vanillaforums.org/discussion/13698/patch-for-proxyconnect-problems) this pre-headers are not cutting off. ProxyConnect thinks that we get some text and trying to get username from this text. But there are no lines like 'Name=mikest' in this pre-headers, so we get an empty username, and ProxyConnect creates user with an empty username.
3. Correct cookies are also very important and we need to set correct cookie domain in ProxyConnect configuration and in our logout function.
As for me, in ProxyConnect configuration I set an empty domain. And in my logout function I do this:
setcookie('Vanilla', ' ', time() - 3600);
unset($_COOKIE['Vanilla']);
p.s.
1. My forum is in /forum directory of my site (it is like http://mysite.com/forum/).
2. If you need to use patch, you should always apply it BEFORE enabling and configuring ProxyConnect plugin! Otherwise you will get incorrect behavior.
Basically CodeIgniter session cookies don't work with ProxyConnect; I'm not sure why, but after creating my own test cookies login system ProxyConnect works!
For anyone looking for the php url-authenticator this is what mine looks like:
header('HTTP/1.1 200 OK');
header('Content-Type: text/plain');
echo 'UniqueID='.$user_id;
echo "\n";
echo 'Name='.$username;
echo "\n";
echo 'Email='.$email;
De-listing as a bug as it's not ProxyConnect's fault.
I create a cookie on login with:
setcookie("TestCookie", $user_id, time()+3600, "/", ".domainname.com");
I then get the current user_id from the cookie in the url-authenticator controller with :
if(isset($_COOKIE['TestCookie']))
{
$user_id = $_COOKIE["TestCookie"];
and get the rest of the user details from the database based on user_id in this cookie.:
$row = $this->login_model->get_user_details_id($user_id);
$user_id = $row->user_id;
$username = $row->username;
$email = $row->email;
}
then echo them as they should be..
Obviously this isnt the most secure system without cookie encryption or something but it should get it working.
I destroy on logout with:
setcookie("TestCookie",'', time()-3600, '/', ".domainname.com");
unset($_COOKIE['TestCookie']);
also destroy the Vanilla cookie.
To note there were some issues with a cookie forming after visiting the Vanilla forum while not logged in, which would disrupt the user then logging in and accessing his forum account, so i destroy the vanilla cookie on Login as well.
setcookie('Vanilla', '', time()-3600, '/', ".domainname.com");
unset($_COOKIE['Vanilla']);
Let me know of any problems.
Looks like "1 comment | written by (blank) | postname
any hints?
wp and vanilla newest versions.
thx, Frank
They work on my localhost but on the production server ( Ubuntu 10 server with LAMP , PHP 5) it fails
I don't know if this is significant, but after I set the proxyconnect configuration in the dashboard and sign out to test it I also experienced the same wait for the next page to load. Also, would the fact that the server is behind a reverse proxy cause a problem?
I've wasted hours trying to fix this, so any help would be greatly appreciated. I'm using Vanilla 2.0.17.8 and ProxyConnect 1.8.4.