[wp-trac] [WordPress Trac] #52210: File URL gets saved even when upload fails

WordPress Trac noreply at wordpress.org
Sun Jan 3 17:12:42 UTC 2021


#52210: File URL gets saved even when upload fails
--------------------------+-----------------------------
 Reporter:  kkroeger93    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Database      |    Version:  5.6
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 **Description**
 ''A File URL reference gets saved into the **wp_posts** table even when
 upload fails.
 ''
 I recognized the issue when I uploaded a attachment into my WordPress
 Site.

 Steps I performed:

 **1. Uploaded a file that was not allowed (e.g a file with .svg ext)**
 ''The upload failed because I didn't had the ALLOW_UNFILTERED_UPLOADS
 Constant set to true.''

 **2. Changed the ALLOW_UNFILTERED_UPLOADS constant to true and re-uplaoded
 the file.**
 ''The file upload worked this time.''

 **3. Tried to open the attachment**
 ''I realized that the URL was altert by a filename**-1**.ext.''

 **Things I checked:**

 I checked the Changesets and found this Change Log:
 https://core.trac.wordpress.org/changeset/46822

 **Conclusion**
 I assume there is a Bug which saves the upload attempt into regardless if
 its completed successfully or not.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52210>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list