mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Bump default MaxStringContentLength for WCF
This commit is contained in:
@@ -112,6 +112,7 @@
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
@@ -202,6 +202,9 @@ namespace ArchiSteamFarm {
|
||||
switch (Program.GlobalConfig.WCFBinding) {
|
||||
case GlobalConfig.EWCFBinding.NetTcp:
|
||||
result = new NetTcpBinding {
|
||||
// This is a balance between default of 8192 which is not enough, and int.MaxValue which is prone to DoS attacks
|
||||
ReaderQuotas = { MaxStringContentLength = ushort.MaxValue },
|
||||
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
Security = { Mode = SecurityMode.None }
|
||||
@@ -209,10 +212,17 @@ namespace ArchiSteamFarm {
|
||||
|
||||
break;
|
||||
case GlobalConfig.EWCFBinding.BasicHttp:
|
||||
result = new BasicHttpBinding();
|
||||
result = new BasicHttpBinding {
|
||||
// This is a balance between default of 8192 which is not enough, and int.MaxValue which is prone to DoS attacks
|
||||
ReaderQuotas = { MaxStringContentLength = ushort.MaxValue }
|
||||
};
|
||||
|
||||
break;
|
||||
case GlobalConfig.EWCFBinding.WSHttp:
|
||||
result = new WSHttpBinding {
|
||||
// This is a balance between default of 8192 which is not enough, and int.MaxValue which is prone to DoS attacks
|
||||
ReaderQuotas = { MaxStringContentLength = ushort.MaxValue },
|
||||
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
Security = { Mode = SecurityMode.None }
|
||||
|
||||
Reference in New Issue
Block a user