EllisLab text mark
Advanced Search
     
EckoSession V.1.0.0 - Another Session Library
Posted: 24 June 2009 02:26 PM   [ Ignore ]
Avatar
Joined: 2008-06-24
26 posts

I have made another Session Library, because of the need for a project. It would be great if you give me some thoughts about it.

Details: http://codeigniter.com/wiki/EckoSession/

Regards

Carnalito

 Signature 

EckoSession - another native Session library

 
Posted: 26 June 2009 05:38 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2007-04-27
169 posts

it works or not because on the wiki i see “!!!! Please don’t use this class, i am working on it !!!!” ?

 
Posted: 26 June 2009 06:49 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

Hi Folks,

did some bugfixing and changed the version to 1.0.1

It is worth a try.

Regards

Carnalito

 Signature 

EckoSession - another native Session library

 
Posted: 26 June 2009 07:46 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-11
2985 posts

That is a definite security improvement. Is this basically a fully compatible drop-in replacement that moves the data from browser to database?

I’m not so keen on the way you create your security key though. It seems to be created from a static string and then use only a few bits of pretty common $_SERVER data. I would rather see it using the encryption_key from codeigniter and a random salt, mixed in with that data if you wish.

Also, will this data be cached?

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

 
Posted: 26 June 2009 07:50 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-11
2985 posts

Another thing, how well do you handle mismatches of sessions/cookie/database?

I have implemented something like this at work to allow login integration between a CMS and our online trading systems and I had to find a way to keep the cookie refreshed while the user was looking around either site even when not requesting any session data.

I also had to make sure the database record was replaced if the cookie existed while the database record didn’t, will your library do this?

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

 
Posted: 26 June 2009 09:19 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

Hi Phil,

Phil Sturgeon - 26 June 2009 11:46 AM

That is a definite security improvement. Is this basically a fully compatible drop-in replacement that moves the data from browser to database?

i am using this as a fully drop-in replacement in my app. As you can see i am currently in a phase wich i am open to improvements wink

Phil Sturgeon - 26 June 2009 11:46 AM

I’m not so keen on the way you create your security key though. It seems to be created from a static string and then use only a few bits of pretty common $_SERVER data. I would rather see it using the encryption_key from codeigniter and a random salt, mixed in with that data if you wish.

the security key is needed just for not saving the tokens of this user in plaintext. Other session-libs are saving the useragent in plaintext. I think there is no need to get more encrypting. Maby i don’t get the point!?

Phil Sturgeon - 26 June 2009 11:46 AM

Also, will this data be cached?

What do you mean exactly with: “will this data be cached”? Any examples?

Phil Sturgeon - 26 June 2009 11:50 AM

Another thing, how well do you handle mismatches of sessions/cookie/database? I have implemented something like this at work to allow login integration between a CMS and our online trading systems and I had to find a way to keep the cookie refreshed while the user was looking around either site even when not requesting any session data. I also had to make sure the database record was replaced if the cookie existed while the database record didn’t, will your library do this?

Because the library is based on the native PHP-session-management, there is (as far as i know) no need in handling such issues because PHP itself does.
If the session in the database does not mach the cookie, the session will be started with the session-id of the cookie, if the cookie does not match the database, the cookie will be updated.

Regards

Carnalito

 Signature 

EckoSession - another native Session library

 
Posted: 26 June 2009 09:29 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

Hi Folks,

removed a typo and uploaded version to 1.0.2

Regards

Carnalito

 Signature 

EckoSession - another native Session library

 
Posted: 10 September 2012 11:31 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2007-05-30
156 posts

Is anyone still developing this library?
I’ve found a problem where the session_data would be lost when I’m using IE. It seems to happen when an AJAX request is made.

Has anyone encountered this problem?

 
Posted: 11 September 2012 07:07 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

Hi,
what exactly do you do when this happens?!
carnalito

 Signature 

EckoSession - another native Session library

 
Posted: 11 September 2012 09:12 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2007-05-30
156 posts

I tested it and it seems to happen on IE8 (I haven’t tried other IE versions) only. It works fine on Safari and Firefox (presumably Chrome too).

The page runs a jquery ajax call on load, if I take out the jquery ajax call, it works fine, the session data stays in the database. Once I have the ajax call in the page, the session data seems to get lost.

If you want me to debug it, let me know where I should put the debug statements.

 
Posted: 11 September 2012 02:56 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

What about the session-id, is it included in your ajax-request?!

 Signature 

EckoSession - another native Session library

 
Posted: 11 September 2012 08:14 PM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2007-05-30
156 posts

No it’s not. Do I just include it as another POST parameter? Does it need to be a specific name?

 
Posted: 12 September 2012 03:32 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

yes, it is just another post parameter. The name is whatever you set it in php-ini - just check your config.

 Signature 

EckoSession - another native Session library

 
Posted: 20 September 2012 04:20 AM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2010-01-11
8 posts

Sounds pretty good. But before i read your code, i need to know what you actually done with this library. Is it not available in CI Session library or you made the simple one?

Please write the feature of your library.

Thanks.

 
Posted: 20 September 2012 04:38 AM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-24
26 posts

New URL: https://github.com/EllisLab/CodeIgniter/wiki/EckoSession

 Signature 

EckoSession - another native Session library