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 :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 10:08 Go to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 10:40 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 10:46 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 10:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 10:54 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 11:08 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 11:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 11:21 Go to previous messageGo to next message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Done.
Re: Proposed code change for potentially more unique sysid [message #184652 is a reply to message #184651] Tue, 14 January 2014 11:23 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Perfect, I hope this is the first of many to come!
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Sat Dec 07 00:52:15 EST 2024

Total time taken to generate the page: 0.04888 seconds