FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Proposed code change for potentially more unique sysid
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Proposed code change for potentially more unique sysid [message #184644] Tue, 14 January 2014 15:08 Go to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
Hi, this is my first proposed change, so please let me know if I'm not following the right procedure (I've read the SVN docs on the wiki site).

We were experiencing session collisions for new logins, as the ses_make_sysid() function was not generating unique enough identifiers. We are using basic authentication on our server, so I'm proposing to add REMOTE_USER to the set of environment variables used to uniquely identify the client browser. For installs where basic authentication is not used, this addition will have no impact.

Below is the change...please review and let me know if I can apply for commit access in SourceForge.

--- cookies.inc.t-orig  2014-01-14 09:57:48.986943684 -0500
+++ cookies.inc.t       2014-01-14 09:58:06.153061812 -0500
@@ -15,7 +15,7 @@
                return;
        }

-       $keys = array('HTTP_USER_AGENT', 'SERVER_PROTOCOL', 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT_LANGUAGE');
+       $keys = array('REMOTE_USER', 'HTTP_USER_AGENT', 'SERVER_PROTOCOL', 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT_LANGUAGE');
        if ($GLOBALS['FUD_OPT_3'] & 16) {       // SESSION_IP_CHECK
                $keys[] = 'HTTP_X_FORWARDED_FOR';
                $keys[] = 'REMOTE_ADDR';
Re: Proposed code change for potentially more unique sysid [message #184645 is a reply to message #184644] Tue, 14 January 2014 15:40 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Patch looks good, thanks!
What is your sourceforge.net username?
Re: Proposed code change for potentially more unique sysid [message #184646 is a reply to message #184645] Tue, 14 January 2014 15:46 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
My SourceForge username is "kmoradha". Do I need to do anything special to apply for commit access, or do you just grant it? I can't find a button anywhere on the project page... Smile
Re: Proposed code change for potentially more unique sysid [message #184647 is a reply to message #184646] Tue, 14 January 2014 15:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I'm going to grant it right now. Give me 5 minutes.
Re: Proposed code change for potentially more unique sysid [message #184648 is a reply to message #184647] Tue, 14 January 2014 15:54 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Done. Please try to commit.
Re: Proposed code change for potentially more unique sysid [message #184649 is a reply to message #184648] Tue, 14 January 2014 16:08 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
Thanks for the quick review and approval...I've committed the change (rev 5757).
Re: Proposed code change for potentially more unique sysid [message #184650 is a reply to message #184649] Tue, 14 January 2014 16:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Thanks, please also document the change at FUDforum 3.0.6.
Re: Proposed code change for potentially more unique sysid [message #184651 is a reply to message #184650] Tue, 14 January 2014 16:21 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
Done.
Re: Proposed code change for potentially more unique sysid [message #184652 is a reply to message #184651] Tue, 14 January 2014 16:23 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Perfect, I hope this is the first of many to come!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Add a desktop instant messenger to your FUDforum forum
Next Topic: Proposed code change to add AUTO_LOGIN plugin hook
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 11:42:28 GMT 2024

Total time taken to generate the page: 0.02453 seconds