Comment

Comment by huhtenberg

On nginx a stop-gap measure is to block all multipart posts before they reach the php code.

Add this to nginx.conf (or drop as a text file into /etc/nginx/conf.d/) :

  map $http_content_type $block_multipart { default 0; ~*^multipart/form-data 1; }
Then in every 'location /' block for every hosted server:

  location / {
    if ($block_multipart) { return 403; }
    ...
  }
Then restart nginx.
parent huhtenberg 10 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton