#2792 closed defect (bug) (fixed)
Escape properly filenames in bbp_converter_setting_callback_platform
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | low |
Severity: | trivial | Version: | 2.1 |
Component: | General | 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.
Good catch @xknown!