Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

limit upload

Oct 09 09 10:50 pm

can limit the size of upload file ?
thanks

Marco

Re: limit upload

Oct 11 09 2:45 pm

Hi,

For web traffic I don't know of a way, or email attachment when Wingate is the mail server, yes you can control the gross message size.

Having said that, with policies you can control the amount of traffic a client is granted, not sure though that this is a solution to your request.

Re: limit upload

Oct 12 09 3:20 pm

HTTP clients, although not required to, are encourage to send a content-length header that specifies the overall size of a file being uploaded. This creates a problem for a proxy server that is trying to control allowed file upload size. Because the content-length header is not required, a client can either neglect to add the content-length header, or can spoof the content-length header with a false value in order to bypass any upload restriction that you enforce.

The main problem though is that WinGate treats HTTP headers as strings in policy. This means there is no greater than or less than operators to make decisions on HTTP headers which would be required to make restrictions such as "users are not allowed content-length headers greater than X bytes" or "users are allowed content-length headers less than X bytes". As a string, only the 'equals', 'contains', 'begins with', 'ends with' or 'is empty' operators are available to be used which won't help in this case.

I envisage that in WinGate 7.x it will be simple to use a script (JAVA or LUA) in policy that gets the string value of an HTTP Header and converts it to an integer in order to perform a decision against the int value. This will make controlling file upload size possible.

In summary:
- In WinGate 6.x, this is not possible.
- In WinGate 7.x this will be possible, however not 100% reliable.

To take a stab at what your next question will probably be :-). WinGate 7.x is still in development and I don't have a release date that I can divulge.

Re: limit upload

Oct 12 09 7:55 pm

Many thanks to all.

marcoB

Re: limit upload

Oct 18 13 6:02 pm

Hi,

I am new to Wingate. Currently I am using Wingate 8. I noticed that this topic was discussed few years back so am wondering if the new version has this mechanism in place. We would like to limit the size of a file that a user can upload.

Thanks,
Zeph
Post a reply