Malformed "resource" parameter for /.well-known/webfinger doesn't return 400
Expected behaviour
From RFC 7033:
4.2. Performing a WebFinger Query
A WebFinger client issues a query using the GET method to the well- known [3] resource identified by the URI whose path component is "/.well-known/webfinger" and whose query component MUST include the "resource" parameter exactly once and set to the value of the URI for which information is being sought.
If the "resource" parameter is absent or malformed, the WebFinger resource MUST indicate that the request is bad as per Section 10.4.1 of RFC 2616 [2].
Section 10.4.1 of RFC 2616:
10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
Actual behaviour
I may be wrong, but since "resource" is supposed to be an URI, "foobarbaz" should probably be considered malformed, therefor trigger a 400. But:
$ curl https://pleroma.site/.well-known/webfinger\?resource\=foobarbaz -I | head -n 1
HTTP/2 404
By the way, Mastodon has the same issue, but Peertube correctly returns 400.