Make WordPress Core


Ignore:
Timestamp:
11/30/2011 09:05:22 PM (13 years ago)
Author:
azaozz
Message:

Sanitize options for resizing in the uploader, props mhauan, nacin, fixes #19399

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r19384 r19494  
    13511351
    13521352<script type="text/javascript">
    1353 var resize_height = <?php echo get_option('large_size_h', 1024); ?>, resize_width = <?php echo get_option('large_size_w', 1024); ?>,
     1353<?php
     1354// Verify size is an int. If not return default value.
     1355$large_size_h = absint( get_option('large_size_h') );
     1356if( !$large_size_h )
     1357    $large_size_h = 1024;
     1358$large_size_w = absint( get_option('large_size_w') );
     1359if( !$large_size_w )
     1360    $large_size_w = 1024;
     1361?>
     1362var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
    13541363wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
    13551364</script>
Note: See TracChangeset for help on using the changeset viewer.