Skip to content

Commit

Permalink
Fixed issue: [security] Possible session fixation on survey entry wit…
Browse files Browse the repository at this point in the history
…h token
  • Loading branch information
c-schmitz committed Dec 2, 2016
1 parent e3f01b2 commit ea34784
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/helpers/frontend_helper.php
Expand Up @@ -1164,6 +1164,7 @@ function buildsurveysession($surveyid,$preview=false)
}
}


//RESET ALL THE SESSION VARIABLES AND START AGAIN
unset($_SESSION['survey_'.$surveyid]['grouplist']);
unset($_SESSION['survey_'.$surveyid]['fieldarray']);
Expand All @@ -1172,7 +1173,9 @@ function buildsurveysession($surveyid,$preview=false)
unset($_SESSION['survey_'.$surveyid]['fieldmap-' . $surveyid . '-randMaster']);
unset($_SESSION['survey_'.$surveyid]['groupReMap']);
$_SESSION['survey_'.$surveyid]['fieldnamesInfo'] = Array();

// Generate Session ID
Yii:app()->session->regenerateID(true);

// Multi lingual support order : by REQUEST, if not by Token->language else by survey default language
if (returnGlobal('lang',true))
{
Expand Down

1 comment on commit ea34784

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure, but use_trans_sid disable that functionnality. And it's disabled by default since a long time in PHP.

Else use-only-cookies do it for sure. And Yii have a solution for this setCookieMode (And maybe we can set it in internal).

Please sign in to comment.