FIX #yogosha5765
This commit is contained in:
parent
715490be0b
commit
ae0468e107
@ -97,7 +97,7 @@ if ($id) {
|
||||
|
||||
print dol_get_fiche_head($head, 'note', $langs->trans("Member"), -1, 'user');
|
||||
|
||||
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -713,7 +713,7 @@ class FormCompany extends Form
|
||||
if ($resql) {
|
||||
print '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'"';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
$javaScript = "window.location='".$_SERVER['PHP_SELF']."?".$var_id."=".($forceid > 0 ? $forceid : $object->id).$moreparam."&".$htmlname."=' + form.".$htmlname.".options[form.".$htmlname.".selectedIndex].value;";
|
||||
$javaScript = "window.location='".dol_escape_js($_SERVER['PHP_SELF'])."?".$var_id."=".($forceid > 0 ? $forceid : $object->id).$moreparam."&".$htmlname."=' + form.".$htmlname.".options[form.".$htmlname.".selectedIndex].value;";
|
||||
print ' onChange="'.$javaScript.'"';
|
||||
}
|
||||
print '>';
|
||||
|
||||
@ -150,7 +150,7 @@ function testSqlAndScriptInject($val, $type)
|
||||
$inj += preg_match('/"/i', $val); // We refused " in GET parameters value.
|
||||
}
|
||||
if ($type == 2) {
|
||||
$inj += preg_match('/[;"<>]/', $val); // PHP_SELF is a file system (or url path without parameters). It can contains spaces.
|
||||
$inj += preg_match('/[:;"\'<>\?]/', $val); // PHP_SELF is a file system (or url path without parameters). It can contains spaces.
|
||||
}
|
||||
|
||||
return $inj;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user