Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
file system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2011 at 07:40 UTC
Updated:
26 Feb 2011 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
iccle commentedThis seems to be down to a regex in file.field.inc line 146
if (!preg_match('/^([a-z0-9]+([.][a-z0-9])* ?)+$/', $extensions)) {Is there a way i can override this behavior without hacking code? I was able to upload files with this extension in Drupal 6, and need the same functionality in order to upgrade our site.
Comment #2
iccle commentedOk the only option i have had (as far as i can tell) in order to get my site working as it should, is to hack the core :(
By changing line 146 of /modules/file/file.field.inc from:
if (!preg_match('/^([a-z0-9]+([.][a-z0-9])* ?)+$/', $extensions)) {to:
if (!preg_match('/^([a-z0-9_]+([.][a-z0-9_])* ?)+$/', $extensions)) {I can now add quake demo files in my file field, im pretty certain that the regex is not as efficient/tight as it could be ill delve into that at a later point.
Comment #3
yched commentedrecategorizing
Comment #4
exlin commentedIs there any reason security vice not to implement this to core?
Comment #5
yched commentedre-recategorizing :-)