How to communicate to server that a file was infected and blocked by external tool (firewall/antimalware)?

I wanted to see what the end user would experience if a malware was detected on Nextcloud, so I uploaded an EICAR test file.

My Nextcloud provider use a firewall that blocked the upload, and returned a 503 error. Nextcloud then alerted me with “Error during upload, status code 503”, which is not user-friendly at all. At first, I thought my provider had some server issues.
image

The request in question returned a webpage that the end-user obviously cannot see:

Is there a way to tell NC that the uploaded file was blocked by something else ? Or change the notification to something more verbose like "Error during upload, status code 503. A malware might have been detected and blocked during your upload. Contact your administrator for more information. "

I’m thinking that there must be something the error page can return to NC to warn NC about this, either with a json or a special header in the response.

Surely my provider is not the only one using a third-party/external firewall/antimalware protection on their servers.

Thanks to anyone who can provide some insights on this.

The webserver of your Nextcloud instance resp. Nextcloud itself has no access to the firewall log of your provider. So you cannot get the reason of the block.

I understand that, but is there anything the provider can do to notify nextcloud of the block and make the user experience better ? Because a simple 503 error doesn’t say much to any regular user.

EDIT: As said earlier, I cannot imagine that a very not user-friendly error 503 pops up on all instances across the globe when a firewall detect and block a threat, which is a common thing. Surely there is a way to notify the end-user.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.