Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internals:internals-session [2007/08/27 13:17]
serge.aumont@cru.fr
internals:internals-session [2018/03/29 03:47] (current)
ikeda@conversion.co.jp Obsoletion
Line 1: Line 1:
-====== Internals: SympaSession.pm ======+====== ​× Internals: SympaSession.pm ====== 
 +<note warning>​ 
 +  * This document was obsoleted. 
 + 
 +</​note>​
  
 This module provides objects to create, load, store and remove sessions. This module provides objects to create, load, store and remove sessions.
  
-===== How to use sessions objet ? ===== 
-Session are initialized at beginning of the main wwsympa loop. They are updated at the end of this loop. So basic extention of sessions usage in wwsympa just need to set new session vars anyware in wwsympa.fcgi actions. Imagine you want to introduce in Sympa a menu to change the user interface skin. You will probably introduce a new action associated with a form to choose skins ; this form will introduce wwsympa an incomming parameter named $in{'​skin_name'​}. This parameter will become a property of the current session just by the following instruction : 
  
-  ​$session->​{'​skin_name'​} = in{'​skin_name'​};​+===== How to use sessions object ? ===== 
 +Session are initialized at the beginning of the main wwsympa loop. They are updated at the end of this loop. So basic extension of sessions usage in wwsympa just needs to set new session vars anywhere in wwsympa.fcgi actions. Imagine you want to introduce a menu in Sympa to change the user interface skin. You will probably introduce a new action associated with a form to choose skins; this form will introduce in wwsympa an incoming parameter named $in{'​skin_name'​}. This parameter will become a property of the current session just by the following instruction : 
 + 
 +  ​$session->​{'​skin_name'​} = $in{'​skin_name'​};​
  
 That's all ! That's all !
Line 41: Line 46:
 store() convert a set of vars into a //​data_session//​ string which can be stored in the database using tools::​hash_2_string store() convert a set of vars into a //​data_session//​ string which can be stored in the database using tools::​hash_2_string
  
 +store() renew the session_id. This make the session hijaking much more diffcult. (([[http://​en.wikipedia.org/​wiki/​Session_hijacking#​Prevention]]))
  
 ==== purge_old_sessions() ==== ==== purge_old_sessions() ====
  • internals/internals-session.1188213472.txt.gz
  • Last modified: 2007/08/27 13:18
  • (external edit)