Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absent or malformed "resource" parameter for /.well-known/webfinger doesn't return 400 #2180

Closed
progval opened this issue May 14, 2020 · 1 comment
Labels
🕸️ ActivityPub Federation-related issue 🐛 Bug Something isn't working

Comments

@progval
Copy link

progval commented May 14, 2020

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

$ curl https://pixelfed.social/.well-known/webfinger -I | head -n 1
HTTP/2 302 
$ curl https://pixelfed.social/.well-known/webfinger\?resource\=foobar -I | head -n 1
HTTP/2 404

(btw, Mastodon always incorrectly returns 404, Pleroma correctly returns 400 on absent resource, but incorrectly returns 404 on malformed resource; and Peertube correctly returns 400 on both.)

EDIT: Mastodon just fixed it: mastodon/mastodon#13759

@dansup dansup added 🐛 Bug Something isn't working 🕸️ ActivityPub Federation-related issue labels May 15, 2020
@dansup dansup closed this as completed in 302ff87 May 16, 2020
@progval
Copy link
Author

progval commented May 16, 2020

thanks!

hnrd pushed a commit to hnrd/pixelfed that referenced this issue May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕸️ ActivityPub Federation-related issue 🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants