Skip to:
Content

bbPress.org

Changeset 6661


Ignore:
Timestamp:
08/20/2017 09:25:31 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Converter: bind number-of-rows attribute to between 1 and 5000.

This change adds validation to ensure no unexpected number of database rows are queried.

Trunk, for 2.6. Props jrf. See #3148.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/classes/class-bbp-converter.php

    r6658 r6661  
    253253                                : 0,
    254254
    255                         // Rows
     255                        // Rows (bound between 1 and 5000)
    256256                        '_bbp_converter_rows' => ! empty( $_POST['_bbp_converter_rows'] )
    257                                 ? (int) $_POST['_bbp_converter_rows']
     257                                ? min( max( (int) $_POST['_bbp_converter_rows'], 1 ), 5000 )
    258258                                : 0,
    259259
Note: See TracChangeset for help on using the changeset viewer.