~hww3/caudium

224caf27ee918cb795a85b2df0433f429674308c — William Welliver 1 year, 2 months ago 9f3171a
123sessions: fix empty redirect error caused by possibly malformed prestates
1 files changed, 3 insertions(+), 1 deletions(-)

M server/modules/misc/123session.pike
M server/modules/misc/123session.pike => server/modules/misc/123session.pike +3 -1
@@ 467,6 467,7 @@ string sessionid_create() {

mixed sessionid_set_prestate(object id, string SessionID) {
  string url=Caudium.strip_prestate(Caudium.strip_config(id->raw_url));
  if(url == "") url = "/";
  url = Caudium.http_decode_url(url);
  string new_prestate = "SessionID="+SessionID;
  id->prestate += (<new_prestate>);


@@ 475,7 476,8 @@ mixed sessionid_set_prestate(object id, string SessionID) {

mixed sessionid_remove_prestate(object id) {   
  string url=Caudium.strip_prestate(Caudium.strip_config(id->raw_url));
  id->prestate = (<>);                                   
  id->prestate = (<>);  
  if(url == "") url = "/";                                 
  // cd34, 10/30/2001
  return Caudium.HTTP.redirect(id->not_query+(id->query ? "?"+id->query : ""), id);
}