DOC: config: document the FCGI path handling and its security implications
Some users report the FCGI support as a security issue because the
request path is URL-decoded and used to build the SCRIPT_NAME,
SCRIPT_FILENAME, PATH_INFO and PATH_TRANSLATED parameters without any
check: a path with '.' or '..' segments, or an absolute path, may point
outside the document root, and if the FastCGI application executes the
corresponding script, it may serve arbitrary files.
This is intentional. HAProxy does not normalize request paths by
default and passes them as-is, because only the component that will
interpret the request reliably knows how to normalize its paths
depending on its environment. HAProxy is not aware of the file system
layout, the mount points or the symlinks on the remote host, so it
cannot safely know if a path is finally inside or outside the document
root. It is the application's responsibility to check the script it is
asked to execute, exactly like for a web server, and it may also be
handled by the administrator with http-request rules.
To prevent the same question from being raised again, this is now
clearly documented in a new section 10.4 'Path handling and security
considerations', with a pointer from the docroot directive.