Skip to content

Commit

Permalink
Fixed issue: Trailing space in token key leads to unrecoverable surve…
Browse files Browse the repository at this point in the history
…y situation
  • Loading branch information
c-schmitz committed Dec 16, 2014
1 parent d94715b commit 5501572
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/controllers/survey/index.php
Expand Up @@ -69,7 +69,7 @@ function action()
$thisstep = $param['thisstep'];
$move=getMove();
Yii::app()->setConfig('move',$move);
$clienttoken = $param['token'];
$clienttoken = trim($param['token']);
$standardtemplaterootdir = Yii::app()->getConfig('standardtemplaterootdir');
if (is_null($thissurvey) && !is_null($surveyid)) $thissurvey = getSurveyInfo($surveyid);

Expand Down Expand Up @@ -314,7 +314,7 @@ function action()
}

if ($errormsg == "") {
LimeExpressionManager::SetDirtyFlag();
LimeExpressionManager::SetDirtyFlag();
buildsurveysession($surveyid);
if (loadanswers()){
Yii::app()->setConfig('move','movenext');
Expand Down Expand Up @@ -391,7 +391,7 @@ function action()
{
$sError = $clang->gT("This invitation is not valid anymore.");
}
else // This can not happen
else // This can not happen
{
$sError = $clang->gT("This is a controlled survey. You need a valid token to participate.");
}
Expand Down Expand Up @@ -599,7 +599,7 @@ function _getParameters($args = array(), $post = array())
foreach(array('lang','action','newtest','qid','gid','sid','loadname','loadpass','scid','thisstep','move','token') as $sNeededParam)
{
$param[$sNeededParam]=returnGlobal($sNeededParam,true);
}
}

return $param;
}
Expand Down

0 comments on commit 5501572

Please sign in to comment.