Make WordPress Core

Opened 3 years ago

Last modified 8 days ago

#22403 assigned defect (bug)

Prevent default browser behavior with Plupload disallowed file extensions

Reported by: nacin Owned by: azaozz
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.3
Component: Upload Keywords: has-patch
Focuses: Cc:


See #22149. When Plupload is set to accept only certain file types, the drag event falls back to the browser's default behavior. That means HTML files replace the entire viewport, ZIP files get re-downloaded, etc. Ideally, our own handlers intercept such a drag event and prevents anything else from happening.

Attachments (1)

22403.diff (580 bytes) - added by antpb 3 weeks ago.

Download all attachments as: .zip

Change History (5)

comment:1 @kovshenin3 years ago

  • Cc kovshenin added

comment:2 @chriscct75 weeks ago

  • Keywords needs-patch added
  • Priority changed from low to normal
  • Severity changed from minor to normal

comment:3 @antpb3 weeks ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 4.4

We could add some jQuery to the admin-header file to disallow drag and drop events. The following patch fixes it. I've tested the media upload page's drag and drop feature after applying the patch and this does not overwrite the functionality.

@antpb3 weeks ago

comment:4 @wonderboymusic8 days ago

  • Owner set to azaozz
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.