WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9918 closed feature request (wontfix)

Disable Flash Upload Option

Reported by: robertaccettura Owned by: westi
Milestone: Priority: low
Severity: minor Version: 2.8
Component: Upload Keywords: reporter-feedback, needs-patch
Focuses: Cc:

Description

Flash upload doesn't work when using SSL admin. So far I haven't found a situation where it works.

I'm inclined to think if FORCE_SSL_ADMIN is true flash should be disabled, but at a minimum a FORCE_BROWSER_UPLOAD would be very handy for administrators who want to disable the flash upload for users in such cases.

This patch makes life a little easier for SSL folks and no impact on anyone else (win win).

I'm also attaching an optional patch to disable on FORCE_SSL_ADMIN.

This is a known issue with swfupload:
http://demo.swfupload.org/Documentation/#knownissues

Attachments (2)

9918_disable_with_ssl.diff (647 bytes) - added by robertaccettura 6 years ago.
Disable when SSL is in use
9918_force_browser_upload.diff (1.0 KB) - added by robertaccettura 6 years ago.
Force Browser Upload Flag

Download all attachments as: .zip

Change History (15)

@robertaccettura6 years ago

Disable when SSL is in use

comment:1 @robertaccettura6 years ago

  • Owner changed from ryan to robertaccettura
  • Status changed from new to accepted

comment:2 @robertaccettura6 years ago

  • Owner changed from robertaccettura to ryan
  • Status changed from accepted to assigned

Reassigning to ryan hopefully to get some visibility

comment:3 @Denis-de-Bernardy6 years ago

Patch is no good. Flash uploads work fine with SSL on my end.

comment:4 @Denis-de-Bernardy6 years ago

  • Component changed from Security to Upload

comment:5 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to Future Release

punting pending better patch

comment:6 @robertaccettura6 years ago

Can you describe how the FORCE_BROWSER_UPLOAD constant failed?

comment:7 @Denis-de-Bernardy6 years ago

it's not defined anywhere. so it defaults to a string with the same value.

comment:8 @westi6 years ago

  • Keywords reporter-feedback added; needs-patch flash ssl admin removed
  • Owner changed from ryan to westi

Why do we need a define when you have a perfectly good filter to use?

comment:9 follow-up: @robertaccettura6 years ago

It would only disable if FORCE_BROWSER_UPLOAD is defined and set to true, this is similar to several other constants that can be put in wp-config including WP_CACHE, FORCE_SSL_ADMIN.

We could change it to !defined('FORCE_BROWSER_UPLOAD') though note defined() only checks that it's defined, not the value, a bug in several plugins I've seen in the past that use such a technique.

comment:10 in reply to: ↑ 9 @Denis-de-Bernardy6 years ago

Replying to robertaccettura:

It would only disable if FORCE_BROWSER_UPLOAD is defined and set to true, this is similar to several other constants that can be put in wp-config including WP_CACHE, FORCE_SSL_ADMIN.

We could change it to !defined('FORCE_BROWSER_UPLOAD') though note defined() only checks that it's defined, not the value, a bug in several plugins I've seen in the past that use such a technique.

You missed the point:

var_dump( my_undefined_variable ); // my_undefined_variable
var_dump( (bool) my_undefined_variable ); // true
var_dump( defined('my_undefined_variable') && my_undefined_variable ); // false

@robertaccettura6 years ago

Force Browser Upload Flag

comment:11 @robertaccettura6 years ago

  • Milestone changed from Future Release to 2.8

This should handle well in 2.8 with latest patch.

comment:12 @lloydbudd6 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to 2.9
  • Priority changed from normal to low

v2.8 is sailing. Should only include regressions at this point.

Also, patch does not meet coding standards -- I know, I know, WP does not meet its own coding style either, but your patch isn't even consider with the code around it or itself.

if(FORCE_BROWSER_UPLOAD) should be if ( FORCE_BROWSER_UPLOAD ) , etc.

Actually, on further consideration, I think this should be WONTFIX. Already, seems well handled by plugin http://wordpress.org/extend/plugins/no-flash-uploader/ . Don't think we should move to defines for everything.

comment:13 @Denis-de-Bernardy6 years ago

  • Milestone 2.9 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

let's just close then, since a plugin exists.

Note: See TracTickets for help on using tickets.