Skip to content

Commit e4c5401

Browse files
committed
Properly escape MIME transformatoin names
Fixes phpmyadmin#13045 Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 05112e9 commit e4c5401

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ phpMyAdmin - ChangeLog
9191
- issue #13040 Compatibility with hhvm 3.18
9292
- issue #13031 Fixed displaying of all rows
9393
- issue #12967 Fixed related field selection for native relations
94+
- issue #13045 Properly escape MIME transformatoin names
9495

9596
4.6.6 (2017-01-23)
9697
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'

templates/columns_definitions/transformation.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$available_mime[$type . '_file'][$mimekey]
1818
) . ' (' . strtolower($parts[0]) . ":" . $parts[1] . ')';
1919
?>
20-
<option value="<?= $available_mime[$type . '_file'][$mimekey]; ?>"
20+
<option value="<?= htmlspecialchars($available_mime[$type . '_file'][$mimekey]); ?>"
2121
<?= $checked; ?>
2222
title="<?= htmlspecialchars($tooltip); ?>">
2323
<?= htmlspecialchars($name); ?>

transformation_overview.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
foreach ($types['mimetype'] as $key => $mimetype) {
2626

2727
if (isset($types['empty_mimetype'][$mimetype])) {
28-
echo '<i>' , $mimetype , '</i><br />';
28+
echo '<i>' , htmlspecialchars($mimetype) , '</i><br />';
2929
} else {
30-
echo $mimetype , '<br />';
30+
echo htmlspecialchars($mimetype) , '<br />';
3131
}
3232

3333
}
@@ -60,8 +60,8 @@
6060
$desc = PMA_getTransformationDescription($types[$ttype . '_file'][$key]);
6161
?>
6262
<tr>
63-
<td><?php echo $transform; ?></td>
64-
<td><?php echo $desc; ?></td>
63+
<td><?php echo htmlspecialchars($transform); ?></td>
64+
<td><?php echo htmlspecialchars($desc); ?></td>
6565
</tr>
6666
<?php
6767
}

0 commit comments

Comments
 (0)