#2792 closed defect (bug) (fixed)
Escape properly filenames in bbp_converter_setting_callback_platform
| Reported by: | xknown | Owned by: | netweb |
|---|---|---|---|
| Priority: | low | Milestone: | 2.6 |
| Component: | General | Version: | 2.1 |
| Severity: | trivial | Keywords: | has-patch commit |
| Cc: |
Description
In src/includes/admin/settings.php, the $file variable could be escaped to avoid some issues on files with weird names.
Index: src/includes/admin/settings.php
===================================================================
--- src/includes/admin/settings.php (revision 5710)
+++ src/includes/admin/settings.php (working copy)
@@ -1306,7 +1306,7 @@
while ( $file = readdir( $curdir ) ) {
if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) {
$file = preg_replace( '/.php/', '', $file );
- $platform_options .= '<option value="' . $file . '">' . esc_html( $file ) . '</option>';
+ $platform_options .= '<option value="' . esc_attr( $file ) . '">' . esc_html( $file ) . '</option>';
}
}
Reported originally by https://hackerone.com/yujitounai
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Good catch @xknown!