mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
13 lines
359 B
C#
13 lines
359 B
C#
using System.Web.UI.WebControls;
|
|
using System.Web.Script.Serialization;
|
|
|
|
class Bad
|
|
{
|
|
public static object Deserialize(TextBox textBox)
|
|
{
|
|
JavaScriptSerializer sr = new JavaScriptSerializer(new SimpleTypeResolver());
|
|
// BAD
|
|
return sr.DeserializeObject(textBox.Text); // $ Alert[cs/unsafe-deserialization-untrusted-input]
|
|
}
|
|
}
|