Raise an error for remote url in StatusFinder (#4776)
* Raise an error for remote url in StatusFinder Previous implementation had allowed remote url with status id which also exists on local. Then that bug leads /api/web/embed to return wrong embed url. * Fix oembed_controller_spec
This commit is contained in:
parent
bfa7f9ebf2
commit
6a4e2db661
3 changed files with 13 additions and 0 deletions
|
@ -10,6 +10,8 @@ class StatusFinder
|
|||
def status
|
||||
verify_action!
|
||||
|
||||
raise ActiveRecord::RecordNotFound unless TagManager.instance.local_url?(url)
|
||||
|
||||
case recognized_params[:controller]
|
||||
when 'stream_entries'
|
||||
StreamEntry.find(recognized_params[:id]).status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue