Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eugenij
pleroma
Commits
cddab570
Verified
Commit
cddab570
authored
6 years ago
by
Haelwenn
Browse files
Options
Downloads
Patches
Plain Diff
WebFinger: Sends a 400 when resource param is missing, fix XRD typo in test
parent
5af91020
Branches
fix-streaming-reblog
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pleroma/web/web_finger/web_finger_controller.ex
+4
-0
4 additions, 0 deletions
lib/pleroma/web/web_finger/web_finger_controller.ex
test/web/web_finger/web_finger_controller_test.exs
+10
-1
10 additions, 1 deletion
test/web/web_finger/web_finger_controller_test.exs
with
14 additions
and
1 deletion
lib/pleroma/web/web_finger/web_finger_controller.ex
+
4
−
0
View file @
cddab570
...
...
@@ -35,4 +35,8 @@ defmodule Pleroma.Web.WebFinger.WebFingerController do
send_resp
(
conn
,
404
,
"Unsupported format"
)
end
end
def
webfinger
(
conn
,
_params
)
do
send_resp
(
conn
,
400
,
"Bad Request"
)
end
end
This diff is collapsed.
Click to expand it.
test/web/web_finger/web_finger_controller_test.exs
+
10
−
1
View file @
cddab570
...
...
@@ -29,9 +29,18 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
response
=
build_conn
()
|>
put_req_header
(
"accept"
,
"application/
j
rd+
json
"
)
|>
put_req_header
(
"accept"
,
"application/
x
rd+
xml
"
)
|>
get
(
"/.well-known/webfinger?resource=acct:
#{
user
.
nickname
}
@localhost"
)
assert
response
(
response
,
200
)
end
test
"Sends a 400 when resource param is missing"
do
response
=
build_conn
()
|>
put_req_header
(
"accept"
,
"application/xrd+xml,application/jrd+json"
)
|>
get
(
"/.well-known/webfinger"
)
assert
response
(
response
,
400
)
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment