Fix #3497: Invalid DText denial of service attack.

This commit is contained in:
evazion
2018-01-14 14:22:10 -06:00
parent 4f543671a2
commit 88f4a56890
5 changed files with 19 additions and 7 deletions

View File

@@ -9,10 +9,6 @@ class WikiPagePresenter
wiki_page.body
end
def blurb
DTextRagel.parse_strip(excerpt.to_s)
end
# Produce a formatted page that shows the difference between two versions of a page.
def diff(other_version)
pattern = Regexp.new('(?:<.+?>)|(?:[0-9_A-Za-z\x80-\xff]+[\x09\x20]?)|(?:[ \t]+)|(?:\r?\n)|(?:.+?)')