Skip to content

Commit

Permalink
Fixed issue: #7160: Impossible submit page with some email validation
Browse files Browse the repository at this point in the history
Dev: sanitize_html_string replace -/+ .... by html entities, the use minimum for XSS security
  • Loading branch information
Shnoulle committed Jan 14, 2013
1 parent ab47468 commit 49f6a17
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/modules/CheckQuestion.php
Expand Up @@ -589,7 +589,7 @@ public function getVarAttributeLEM($sgqa,$value)
{
if (preg_match('/other$/',$sgqa))
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/modules/CommentCheckQuestion.php
Expand Up @@ -320,7 +320,7 @@ public function getVarAttributeLEM($sgqa,$value)
{
if (preg_match('/comment$/',$sgqa))
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/modules/CommentListQuestion.php
Expand Up @@ -291,7 +291,7 @@ public function getVarAttributeLEM($sgqa,$value)
{
if (preg_match('/comment$/',$sgqa))
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/modules/ListQuestion.php
Expand Up @@ -600,7 +600,7 @@ public function getVarAttributeLEM($sgqa,$value)
{
if (preg_match('/other$/',$sgqa))
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/modules/MultitextQuestion.php
Expand Up @@ -421,7 +421,7 @@ public function questionProperties($prop = false)

public function getVarAttributeLEM($sgqa,$value)
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}

}
Expand Down
2 changes: 1 addition & 1 deletion application/modules/TextArrayQuestion.php
Expand Up @@ -732,7 +732,7 @@ public function questionProperties($prop = false)

public function getVarAttributeLEM($sgqa,$value)
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}

}
Expand Down
2 changes: 1 addition & 1 deletion application/modules/TextQuestion.php
Expand Up @@ -88,7 +88,7 @@ public function getTypeHelp($language)

public function getVarAttributeLEM($sgqa,$value)
{
return sanitize_html_string(parent::getVarAttributeLEM($sgqa,$value));
return htmlspecialchars(parent::getVarAttributeLEM($sgqa,$value),ENT_NOQUOTES);
}

}
Expand Down

0 comments on commit 49f6a17

Please sign in to comment.