mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:13:25 +08:00
Include /^http… prefix in onebox whitelist URLs regexes to prevent XSS.
This commit is contained in:
@ -3,7 +3,7 @@ require_dependency 'oneboxer/handlebars_onebox'
|
||||
module Oneboxer
|
||||
class GithubBlobOnebox < HandlebarsOnebox
|
||||
|
||||
matcher /github\.com\/[^\/]+\/[^\/]+\/blob\/.*/
|
||||
matcher /^https?:\/\/(?:www\.)?github\.com\/[^\/]+\/[^\/]+\/blob\/.*/
|
||||
favicon 'github.png'
|
||||
|
||||
def translate_url
|
||||
|
Reference in New Issue
Block a user