Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mastofe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pleroma
mastofe
Commits
2ba6537f
Commit
2ba6537f
authored
9 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Escape PuSH challenge and change subscriptions and salmon APIs to text/plain
parent
68931c1e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/api/salmon_controller.rb
+1
-0
1 addition, 0 deletions
app/controllers/api/salmon_controller.rb
app/controllers/api/subscriptions_controller.rb
+2
-1
2 additions, 1 deletion
app/controllers/api/subscriptions_controller.rb
with
3 additions
and
1 deletion
app/controllers/api/salmon_controller.rb
+
1
−
0
View file @
2ba6537f
class
Api::SalmonController
<
ApiController
before_action
:set_account
respond_to
:txt
def
update
ProcessInteractionService
.
new
.
(
request
.
body
.
read
,
@account
)
...
...
This diff is collapsed.
Click to expand it.
app/controllers/api/subscriptions_controller.rb
+
2
−
1
View file @
2ba6537f
class
Api::SubscriptionsController
<
ApiController
before_action
:set_account
respond_to
:txt
def
show
if
@account
.
subscription
(
api_subscription_url
(
@account
.
id
)).
valid?
(
params
[
'hub.topic'
],
params
[
'hub.verify_token'
])
render
text:
params
[
'hub.challenge'
],
status:
200
render
text:
HTMLEntities
.
new
.
encode
(
params
[
'hub.challenge'
]
)
,
status:
200
else
render
nothing:
true
,
status:
404
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