Security: Session Identifier Not Updated in tcl -
i'm working on open-source application "project-open" , during scanning got following vulnerability:
[medium] session identifier not updated issue: 13800882 severity: medium url: https://<server_name>/register/ risk(s): possible steal or manipulate customer session , cookies, might used impersonate legitimate user,allowing hacker view or alter user records, , perform transactions user fix: not accept externally created session identifiers
though fix mentioned not sufficient me understand completely.please guide me how should remove this.also let me know if further details needed understand question. project source code in tcl
i found following code same it's in java.
public httpsession changesessionidentifier(httpservletrequest request) throws authenticationexception { // current session httpsession oldsession = request.getsession(); // make copy of session content map<string,object> temp = new concurrenthashmap<string,object>(); enumeration e = oldsession.getattributenames(); while (e != null && e.hasmoreelements()) { string name = (string) e.nextelement(); object value = oldsession.getattribute(name); temp.put(name, value); } // kill old session , create new 1 oldsession.invalidate(); httpsession newsession = request.getsession(); user user = esapi.authenticator().getcurrentuser(); user.addsession( newsession ); user.removesession( oldsession ); // copy session content (map.entry<string, object> stringobjectentry : temp.entryset()){ newsession.setattribute(stringobjectentry.getkey(), stringobjectentry.getvalue()); } return newsession;
}
p.s. i'm newbie in tcl. please let me know if need further explanation.
there fix in openacs 5.9 addresses scanning reports. please see following discussion on openacs.org reference.
http://www.openacs.org/forums/message-view?message_id=5332821
Comments
Post a Comment