Modify

Opened 6 years ago

Closed 6 years ago

#8503 closed defect (fixed)

Cannot use all as file extenstion

Reported by: anonymous Owned by: Radek Bartoň
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

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
api.py:

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 Radek Bartoň

Resolution: fixed
Status: newclosed

Fixed in r10047.

Modify Ticket

Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.