Deny file upload using regular expressions

Additional features you would like to see added, changed, or removed. This forum isn't just for the Cerberus FTP Server application. Feel free to post suggestions for anything related to Cerberus (the website, this forum, ect.)
Post Reply
alex140181
New User
Posts: 5
Joined: Sun Feb 26, 2017 6:39 am
Location: Germany

Deny file upload using regular expressions

Post by alex140181 » Sun Mar 26, 2017 6:26 am

Hi there!

It would be nice to have some kind of mechanism (e.g. via the event system), to block/deny a file upload based on the filename pattern for instance. The denial should result in some kind of FTP error code (550 or so). This could be a more general / new action ion the event system, e.g. "Trigger xy -> action: raise error 550 with custom message"...

Thanks in advance & kind regards
Alex

User avatar
Serin
Site Administrator
Posts: 1785
Joined: Sat Jan 01, 2005 6:57 pm
Location: United States
Contact:

Re: Deny file upload using regular expressions

Post by Serin » Fri May 26, 2017 2:23 pm

Thanks for the suggestion. In our current implementation, there would be no way to block an upload via the event system since events are currently only fired for file transfers after the upload completes.

Events are asynchronous and decoupled from the actual action that triggers them. Even if we added an event that fired before a file upload, it would be processed independently of the actual file upload. In other words, you couldn't make a decision to cancel the upload based on the event because the system doesn't wait for the event to be processed before continuing with the client connection. This is by design.

We do have a file extension filter in the current release to prevent files with specific file extensions from being uploaded to the server.

alex140181
New User
Posts: 5
Joined: Sun Feb 26, 2017 6:39 am
Location: Germany

Re: Deny file upload using regular expressions

Post by alex140181 » Wed Jan 10, 2018 7:48 am

Hello again,

How's the status here? Any news?

Post Reply