mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:41:04 +08:00
SECURITY: don't onebox whispers
This commit is contained in:
@ -139,6 +139,17 @@ describe OneboxController do
|
||||
expect(response.body).not_to include('blockquote')
|
||||
end
|
||||
|
||||
it 'does not allow whisper onebox' do
|
||||
log_in
|
||||
|
||||
post = create_post
|
||||
whisper = create_post(topic_id: post.topic_id, post_type: Post.types[:whisper])
|
||||
url = Discourse.base_url + whisper.url
|
||||
|
||||
get :show, params: { url: url }, format: :json
|
||||
expect(response.body).not_to include('blockquote')
|
||||
end
|
||||
|
||||
it 'allows onebox to public topics/posts in PM' do
|
||||
log_in
|
||||
|
||||
|
Reference in New Issue
Block a user