Opened 11 years ago
Closed 11 years ago
#32755 closed defect (bug) (fixed)
media_sideload_image should return early when preg_match didn't match
| Reported by: | serpent7776 | Owned by: | chriscct7 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Upload | Version: | 4.2.2 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
If media_sideload_image function is given an url that does not match pattern
'/[^\?]+\.(jpe?g|jpe|gif|png)\b/i'
it should return with error instead of carrying on, because it raises a notice
Notice: Undefined offset: 0 in <path>/wordpress/wp-admin/includes/media.php on line 840
basicaly it tries to access
basename( $matches[0] )
but $matches is empty
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 34984: