I have a production site where users can upload flash files. but I still review files before putting the file on the site.
I have double checked flash nodes files settings option as well as Settings for authenticated user to be set to only accept SWF files and I can confirm it accepts any files despite the settings to only accept SWF files.
Have I miss another setting some where?

Comments

mallet’s picture

Priority: Critical » Minor
Status: Active » Closed (fixed)

Sorry. Forgot to enable SWF tools and is working the way I wanted it. Keep up the great works guys.

amaisano’s picture

Status: Closed (fixed) » Needs work

I have SWF tools enabled along with FlashNode, and users are still able to create nodes with non SWF/FLV uploads, regardless of what my allowed extensions are set to. I hope I don't have to edit the module code to force validation before submit... Any suggestions?

amaisano’s picture

As time was of the essence, I've temporarily added the most basic check to the flashnode_validate() function in the module that rejects node creation if the file is not SWF or FLV:

if (substr($_FILES['files']['name']['flashfile'], -3) !== 'swf' && substr($_FILES['files']['name']['flashfile'], -3) !== 'flv') {
  	form_set_error('flashfile', t('Only <strong>.swf</strong> and <strong>.flv</strong> files are allowed. You\'ve tried to upload a <strong>.' . substr($_FILES['files']['name']['flashfile'], -3) . '</strong> file.'));
  }

Would still like to know what's going wrong here in the first place. Thanks.