Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30052, comment 7


Ignore:
Timestamp:
11/24/2014 10:42:36 PM (10 years ago)
Author:
bobbingwide
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30052, comment 7

    initial v1  
    33When I tried to reset the value to a number below 1000 the new post IDs were still above 1000.
    44
    5 
    65However... on another site, while investigating the placement of the crunching red herring I did get
    76
    8 
    9 `
     7{{{
    108<br />
    119<b>Notice</b>:  Undefined index: extension in <b>/home/herb/public_html/wp-includes/class-wp-image-editor.php</b> on line <b>360</b><br />
     
    1311<b>Notice</b>:  Undefined index: extension in <b>/home/herb/public_html/wp-includes/class-wp-image-editor.php</b> on line <b>360</b><br />
    141218948
    15 `
     13}}}
    1614
    1715This is with WP_DEBUG( 'true' );
     
    1917The file I was uploading is called !.jpg
    2018
    21 I can't reproduce the problem with PHP 5.5.18 on a Windows server
    22 but on PHP 5.3.29, Linux the target file simply becomes jpg''n'' with a thumbnail called jpg''n''-300x182.
     19I can reproduce the problem on PHP 5.3.29 with a Linux server
     20
     21The target file simply becomes jpg''n'', with a thumbnail called jpg''n''-300x182.
    2322
    2423
     
    31306. media_handle_upload(async-upload,0) /home/herb/public_html/wp-admin/async-upload.php:87 2
    3231
    33 /home/herb/public_html/wp-includes/class-wp-image-editor.php(357:0) 2014-11-24T17:54:29+00:00 89 cf! 39 0 58629568/58836616 generate_filename(8) 3 Array
    34 (
    35     [0] =>
    36     [1] =>
    37     [2] =>
    38 )
    3932
    40 /home/herb/public_html/wp-includes/class-wp-image-editor.php(357:0) 2014-11-24T17:54:29+00:00 90 cf! 39 0 58629608/58838952 generate_filename(10) this_file WP_Image_Editor_Imagick Object
    41 (
     33generate_filename(10) this_file WP_Image_Editor_Imagick Object
     34{{{
    4235    [image:protected] => Imagick Object
    4336        (
     
    5548    [quality:protected] =>
    5649    [default_quality:protected] => 90
    57 )
     50}}}
    5851
    5952
    6053$_FILES in media_handle_upload is
    61 /home/herb/public_html/wp-admin/includes/media.php(255:0) 2014-11-24T18:10:14+00:00 84 cf! 27 0 58259600/58443960 media_handle_upload(2) 2 Array
    62 (
    63     [0] => async-upload
    64     [1] => 0
    65 )
    66 
    67 /home/herb/public_html/wp-admin/includes/media.php(255:0) 2014-11-24T18:10:14+00:00 85 cf! 27 0 58259640/58443960 media_handle_upload(4) files Array
    68 (
     54{{{
    6955    [async-upload] => Array
    7056        (
     
    7561            [size] => 88711
    7662        )
    77 
    78 )
     63}}}
    7964
    8065It would appear that sanitize_file_name() is to blame - reducing the file to
    81 /home/herb/public_html/wp-includes/formatting.php(1077:0) 2014-11-24T18:42:51+00:00 99 cf! 27 0 58282560/58446624 sanitize_file_name(16) parts! Array
    82 (
     66{{{
    8367    [0] => jpg
    84 )
    85  
     68}}}
     69
     70Note: I can also produce the problem on a PHP 5.5.18 Windows server using WP_Image_Editor_GD
     71
     72It would appear that sanitize_file_name() is to blame - reducing the file to
     73{{{
     74    [0] => jpg
     75}}}
     76
     77The question is... What is the expected output of sanitize_file_name() when it's all special characters?
     78
     79
     80
    8681
    8782