You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
[security] XSS with malicious ENUM values
Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
@@ -316,6 +316,7 @@ EOT;
|
||||
private function _getEnumSetInputBox($column_index, $criteriaValues,
|
||||
$column_type, $column_id, $in_zoom_search_edit = false
|
||||
) {
|
||||
$column_type = htmlspecialchars($column_type);
|
||||
$html_output = '';
|
||||
$value = explode(
|
||||
', ',
|
||||
@@ -984,7 +985,9 @@ EOT;
|
||||
$html_output .= '<th>'
|
||||
. htmlspecialchars($this->_columnNames[$column_index]) . '</th>';
|
||||
$properties = $this->getColumnProperties($column_index, $column_index);
|
||||
$html_output .= '<td>' . $properties['type'] . '</td>';
|
||||
$html_output .= '<td>'
|
||||
. htmlspecialchars($properties['type'])
|
||||
. '</td>';
|
||||
$html_output .= '<td>' . $properties['collation'] . '</td>';
|
||||
$html_output .= '<td>' . $properties['func'] . '</td>';
|
||||
$html_output .= '<td>' . $properties['value'] . '</td>';
|
||||
@@ -993,11 +996,13 @@ EOT;
|
||||
$html_output .= '<tr><td>';
|
||||
$html_output .= '<input type="hidden"'
|
||||
. ' name="criteriaColumnNames[' . $column_index . ']"'
|
||||
. ' value="' . htmlspecialchars($this->_columnNames[$column_index])
|
||||
. ' value="'
|
||||
. htmlspecialchars($this->_columnNames[$column_index])
|
||||
. '" />';
|
||||
$html_output .= '<input type="hidden"'
|
||||
. ' name="criteriaColumnTypes[' . $column_index . ']"'
|
||||
. ' value="' . $this->_columnTypes[$column_index] . '" />';
|
||||
. ' value="'
|
||||
. htmlspecialchars($this->_columnTypes[$column_index]) . '" />';
|
||||
$html_output .= '<input type="hidden"'
|
||||
. ' name="criteriaColumnCollations[' . $column_index . ']"'
|
||||
. ' value="' . $this->_columnCollations[$column_index] . '" />';
|
||||
|
||||
@@ -3062,8 +3062,11 @@ class PMA_Util
|
||||
// for the case ENUM('–','“')
|
||||
$displayed_type = htmlspecialchars($printtype);
|
||||
if (strlen($printtype) > $GLOBALS['cfg']['LimitChars']) {
|
||||
$displayed_type = '<abbr title="' . $printtype . '">';
|
||||
$displayed_type .= substr($printtype, 0, $GLOBALS['cfg']['LimitChars']);
|
||||
$displayed_type = '<abbr title="'
|
||||
. htmlspecialchars($printtype) . '">';
|
||||
$displayed_type .= htmlspecialchars(
|
||||
substr($printtype, 0, $GLOBALS['cfg']['LimitChars'])
|
||||
);
|
||||
$displayed_type .= '</abbr>';
|
||||
}
|
||||
|
||||
@@ -4363,4 +4366,4 @@ class PMA_Util
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user