mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
16 lines
380 B
C#
16 lines
380 B
C#
using System.Web.UI.WebControls;
|
|
using System.Xml.Serialization;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System;
|
|
|
|
class BadXmlSerializer
|
|
{
|
|
public static object Deserialize(TextBox type, TextBox data)
|
|
{
|
|
var ds = new XmlSerializer(Type.GetType(type.Text));
|
|
// BAD
|
|
return ds.Deserialize(new MemoryStream(Encoding.UTF8.GetBytes(data.Text)));
|
|
}
|
|
}
|