mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-27 20:29:39 +02:00
10 lines
270 B
Ruby
10 lines
270 B
Ruby
|
|
# Unsafe: tainted XML reaches REXML::Document.new, the legacy default-vulnerable
|
||
|
|
# pure-Ruby XML parser that resolves external entities by default.
|
||
|
|
require "rexml/document"
|
||
|
|
|
||
|
|
def handle(params)
|
||
|
|
body = params["xml"]
|
||
|
|
doc = REXML::Document.new(body)
|
||
|
|
doc.root.text
|
||
|
|
end
|