-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathRemoteFlowSource.cs
More file actions
104 lines (85 loc) · 2.46 KB
/
RemoteFlowSource.cs
File metadata and controls
104 lines (85 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using System.Collections.Specialized;
namespace System.ServiceModel
{
public sealed class ServiceContractAttribute : Attribute { }
public sealed class OperationContractAttribute : Attribute { }
}
namespace RemoteFlowSource
{
using System.ServiceModel;
using System.Runtime.Serialization;
using System.Collections.Generic;
[DataContract]
public class SampleData { }
[ServiceContract]
public interface ISampleService
{
[OperationContract]
string Operation(SampleData sampleData, string taint);
}
public class RemoteFlowSource : ISampleService
{
public static void M(System.Web.HttpRequest request, System.Web.UI.WebControls.TextBox textBox)
{
Use(request);
Use(textBox);
}
public string Operation(SampleData sampleData, string taint) => sampleData + taint;
public static void Use(Object o) { }
public static void M2(System.Net.HttpListenerRequest request)
{
Use(request);
}
public static void M2(System.Web.HttpRequestBase request)
{
Use(request.Unvalidated.RawUrl);
}
public static async void M3(System.Net.WebSockets.WebSocket webSocket)
{
var buffer = new byte[1024];
var segment = new ArraySegment<byte>(buffer);
var result = await webSocket.ReceiveAsync(segment, System.Threading.CancellationToken.None);
Use(segment);
}
}
}
namespace AspRemoteFlowSource
{
using System.Web.Services;
public class MySubData
{
public string SubDataProp { get; set; }
}
public class MyElementSubData
{
public string ElementSubDataProp { get; set; }
}
public class MyData
{
public string DataField;
public string DataProp { get; set; }
public MySubData SubData { get; set; }
public MyElementSubData[] Elements { get; set; }
}
public class MyDataElement
{
public string Prop { get; set; }
}
public class MyService
{
[WebMethod]
public void MyMethod(MyData data)
{
Use(data.DataProp);
Use(data.SubData.SubDataProp);
Use(data.Elements[0].ElementSubDataProp);
}
[WebMethod]
public void MyMethod2(MyDataElement[] data)
{
Use(data[0].Prop);
}
public static void Use(object o) { }
}
}