This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fix not rejecting remote URIs when parsing out local IDs (
#3012
)
closed-social-glitch-2
Eugen Rochko
7 years ago
committed by
GitHub
parent
2cc0d56652
commit
43d754eb42
2 changed files
with
4 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
app/lib/tag_manager.rb
+3
-1
app/services/process_interaction_service.rb
+ 1
- 0
app/lib/tag_manager.rb
View File
@ -48,6 +48,7 @@ class TagManager
end
def
unique_tag_to_local_id
(
tag
,
expected_type
)
return
nil
unless
local_id?
(
tag
)
matches
=
Regexp
.
new
(
"
objectId=([
\\
d]+):objectType=
#{
expected_type
}
"
)
.
match
(
tag
)
return
matches
[
1
]
unless
matches
.
nil?
end
+ 3
- 1
app/services/process_interaction_service.rb
View File
@ -123,7 +123,9 @@ class ProcessInteractionService < BaseService
end
def
status
(
xml
)
Status
.
find
(
TagManager
.
instance
.
unique_tag_to_local_id
(
activity_id
(
xml
)
,
'Status'
)
)
uri
=
activity_id
(
xml
)
return
nil
unless
TagManager
.
instance
.
local_id?
(
uri
)
Status
.
find
(
TagManager
.
instance
.
unique_tag_to_local_id
(
uri
,
'Status'
)
)
end
def
activity_id
(
xml
)
Write
Preview
Loading…
Cancel
Save