Opened 6 years ago

Closed 6 years ago

#8503 closed defect (fixed)

Cannot use all as file extenstion

Reported by: anonymous Owned by: Blackhex
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


I would like to allow download of all files, no matter extension.
I can see in code that there is a special treatment of 'all' extension. Intention was probably to allow all downloads if all was configured.
But, as it is implemented, if all is added to the list of allowed extensions, all uploads are denied

791 	        name, ext = os.path.splitext(download['file'])
792 	        if not 'all' in self.ext:
793 	            self.log.debug('file_ext: %s ext: %s' % (ext, self.ext))
794 	            if not ext[1:].lower() in self.ext:
795 	                raise TracError('Unsupported file type.')
796 	        else:
797 	            raise TracError('Unsupported file type.')

If 796-797 are removed, it should work as intended, i.e. if all is in list, all extensions are allowed.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r10047.

Add Comment

Modify Ticket

as closed The owner will remain Blackhex.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.