diff --git a/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc11.nupkg b/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc11.nupkg deleted file mode 100644 index 55e2fdc501..0000000000 Binary files a/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc11.nupkg and /dev/null differ diff --git a/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc12.nupkg b/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc12.nupkg new file mode 100644 index 0000000000..4d5f73f5d8 Binary files /dev/null and b/.nuget/packages/WebSocketSharpNetStandart.1.0.3-rc12.nupkg differ diff --git a/common/ASC.Core.Common/Data/DbQuotaService.cs b/common/ASC.Core.Common/Data/DbQuotaService.cs index de8e328100..ef4b0d2e2f 100644 --- a/common/ASC.Core.Common/Data/DbQuotaService.cs +++ b/common/ASC.Core.Common/Data/DbQuotaService.cs @@ -79,7 +79,6 @@ namespace ASC.Core.Data MaxFileSize = GetInBytes(r.MaxFileSize), MaxTotalSize = GetInBytes(r.MaxTotalSize), Price = r.Price, - Price2 = r.Price2, Visible = r.Visible }; @@ -127,7 +126,6 @@ namespace ASC.Core.Data ActiveUsers = quota.ActiveUsers, Features = quota.Features, Price = quota.Price, - Price2 = quota.Price2, AvangateId = quota.AvangateId, Visible = quota.Visible }; diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs index 371f896960..d6d0018658 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs @@ -14,7 +14,6 @@ namespace ASC.Core.Common.EF public int ActiveUsers { get; set; } public string Features { get; set; } public decimal Price { get; set; } - public decimal Price2 { get; set; } public string AvangateId { get; set; } public bool Visible { get; set; } public override object[] GetKeys() @@ -30,7 +29,7 @@ namespace ASC.Core.Common.EF .Add(MySqlAddDbQuota, Provider.MySql) .Add(PgSqlAddDbQuota, Provider.Postgre) .HasData( - new DbQuota { Tenant = -1, Name = "default", Description = null, MaxFileSize = 102400, MaxTotalSize = 10995116277760, ActiveUsers = 10000, Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", Price = decimal.Parse("0,00"), Price2 = decimal.Parse("0,00"), AvangateId = "0", Visible = false } + new DbQuota { Tenant = -1, Name = "default", Description = null, MaxFileSize = 102400, MaxTotalSize = 10995116277760, ActiveUsers = 10000, Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", Price = decimal.Parse("0,00"), AvangateId = "0", Visible = false } ); return modelBuilder; @@ -81,10 +80,6 @@ namespace ASC.Core.Common.EF .HasColumnName("price") .HasColumnType("decimal(10,2)"); - entity.Property(e => e.Price2) - .HasColumnName("price2") - .HasColumnType("decimal(10,2)"); - entity.Property(e => e.Visible).HasColumnName("visible"); }); } @@ -131,11 +126,6 @@ namespace ASC.Core.Common.EF .HasColumnType("numeric(10,2)") .HasDefaultValueSql("0.00"); - entity.Property(e => e.Price2) - .HasColumnName("price2") - .HasColumnType("numeric(10,2)") - .HasDefaultValueSql("0.00"); - entity.Property(e => e.Visible).HasColumnName("visible"); }); } diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.Designer.cs index 13b05e411b..f363fc6074 100644 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.Designer.cs +++ b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.Designer.cs @@ -657,10 +657,6 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql .HasColumnType("decimal(10,2)") .HasColumnName("price"); - b.Property("Price2") - .HasColumnType("decimal(10,2)") - .HasColumnName("price2"); - b.Property("Visible") .HasColumnType("tinyint(1)") .HasColumnName("visible"); @@ -681,7 +677,6 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql MaxTotalSize = 10995116277760L, Name = "default", Price = 0.00m, - Price2 = 0.00m, Visible = false }); }); diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.cs index 92e7cd58f1..b6b92fd6a9 100644 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.cs +++ b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20210309093641_CoreDbContextMySql.cs @@ -58,7 +58,6 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql features = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), price = table.Column(type: "decimal(10,2)", nullable: false), - price2 = table.Column(type: "decimal(10,2)", nullable: false), avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), visible = table.Column(type: "tinyint(1)", nullable: false) @@ -181,8 +180,8 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql migrationBuilder.InsertData( table: "tenants_quota", - columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "price", "price2", "visible" }, - values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default", 0.00m, 0.00m, false }); + columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "price", "visible" }, + values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default", 0.00m, false }); migrationBuilder.CreateIndex( name: "last_modified", diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs index 49291af257..811e916aa8 100644 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs +++ b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs @@ -655,10 +655,6 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql .HasColumnType("decimal(10,2)") .HasColumnName("price"); - b.Property("Price2") - .HasColumnType("decimal(10,2)") - .HasColumnName("price2"); - b.Property("Visible") .HasColumnType("tinyint(1)") .HasColumnName("visible"); @@ -679,7 +675,6 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql MaxTotalSize = 10995116277760L, Name = "default", Price = 0.00m, - Price2 = 0.00m, Visible = false }); }); diff --git a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.Designer.cs b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.Designer.cs index af54cc92de..dda4ddfb50 100644 --- a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.Designer.cs +++ b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.Designer.cs @@ -652,12 +652,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.CoreDbContextNpgsql .HasColumnType("numeric(10,2)") .HasDefaultValueSql("0.00"); - b.Property("Price2") - .ValueGeneratedOnAdd() - .HasColumnName("price2") - .HasColumnType("numeric(10,2)") - .HasDefaultValueSql("0.00"); - b.Property("Visible") .HasColumnName("visible") .HasColumnType("boolean"); diff --git a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.cs b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.cs index 020bf3a7aa..29d8cf5b69 100644 --- a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.cs +++ b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/20200929123316_CoreDbContextNpgsql.cs @@ -56,7 +56,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.CoreDbContextNpgsql active_users = table.Column(nullable: false), features = table.Column(nullable: true), price = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"), - price2 = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"), avangate_id = table.Column(maxLength: 128, nullable: true, defaultValueSql: "NULL"), visible = table.Column(nullable: false) }, diff --git a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/CoreDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/CoreDbContextModelSnapshot.cs index 2f2982be5c..69671d911d 100644 --- a/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/CoreDbContextModelSnapshot.cs +++ b/common/ASC.Core.Common/Migrations/Npgsql/CoreDbContextNpgsql/CoreDbContextModelSnapshot.cs @@ -650,12 +650,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.CoreDbContextNpgsql .HasColumnType("numeric(10,2)") .HasDefaultValueSql("0.00"); - b.Property("Price2") - .ValueGeneratedOnAdd() - .HasColumnName("price2") - .HasColumnType("numeric(10,2)") - .HasDefaultValueSql("0.00"); - b.Property("Visible") .HasColumnName("visible") .HasColumnType("boolean"); @@ -676,7 +670,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.CoreDbContextNpgsql MaxTotalSize = 10995116277760L, Name = "default", Price = 0.00m, - Price2 = 0.00m, Visible = false }); }); diff --git a/common/ASC.Core.Common/Tenants/TenantQuota.cs b/common/ASC.Core.Common/Tenants/TenantQuota.cs index 139c5ea333..32b0778d96 100644 --- a/common/ASC.Core.Common/Tenants/TenantQuota.cs +++ b/common/ASC.Core.Common/Tenants/TenantQuota.cs @@ -55,8 +55,6 @@ namespace ASC.Core.Tenants public decimal Price { get; set; } - public decimal Price2 { get; set; } - public string AvangateId { get; set; } public bool Visible { get; set; } diff --git a/common/ASC.Data.Encryption/ASC.Data.Encryption.csproj b/common/ASC.Data.Encryption/ASC.Data.Encryption.csproj index 1514be254b..b8c0a6882f 100644 --- a/common/ASC.Data.Encryption/ASC.Data.Encryption.csproj +++ b/common/ASC.Data.Encryption/ASC.Data.Encryption.csproj @@ -2,6 +2,7 @@ net5.0 + false diff --git a/common/ASC.Data.Storage/ASC.Data.Storage.csproj b/common/ASC.Data.Storage/ASC.Data.Storage.csproj index 39949b7e05..1f4b46a239 100644 --- a/common/ASC.Data.Storage/ASC.Data.Storage.csproj +++ b/common/ASC.Data.Storage/ASC.Data.Storage.csproj @@ -2,6 +2,7 @@ net5.0 + false diff --git a/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj b/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj index 77b623f865..aed881dad0 100644 --- a/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj +++ b/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj @@ -5,13 +5,11 @@ - + - - ..\..\..\..\..\Program Files (x86)\Microsoft\Xamarin\NuGet\nunit\3.12.0\lib\netstandard2.0\nunit.framework.dll - + diff --git a/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj b/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj index 6e84dea46d..609f50b52a 100644 --- a/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj +++ b/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj @@ -4,15 +4,13 @@ net5.0 + + + + - - - ..\..\..\..\..\Program Files (x86)\Microsoft\Xamarin\NuGet\nunit\3.12.0\lib\netstandard2.0\nunit.framework.dll - - - diff --git a/common/services/ASC.Socket.IO.Svc/ASC.Socket.IO.Svc.csproj b/common/services/ASC.Socket.IO.Svc/ASC.Socket.IO.Svc.csproj index 2035c38df9..041f0ae13a 100644 --- a/common/services/ASC.Socket.IO.Svc/ASC.Socket.IO.Svc.csproj +++ b/common/services/ASC.Socket.IO.Svc/ASC.Socket.IO.Svc.csproj @@ -21,7 +21,7 @@ - + diff --git a/products/ASC.Files/Core/Configuration/FilesSettings.cs b/products/ASC.Files/Core/Configuration/FilesSettings.cs index 852178710a..3754ad0920 100644 --- a/products/ASC.Files/Core/Configuration/FilesSettings.cs +++ b/products/ASC.Files/Core/Configuration/FilesSettings.cs @@ -31,7 +31,8 @@ using ASC.Common; using ASC.Core; using ASC.Core.Common.Settings; using ASC.Files.Core; - +using ASC.Web.Studio.Core; + namespace ASC.Web.Files.Classes { [Serializable] @@ -114,12 +115,14 @@ namespace ASC.Web.Files.Classes public class FilesSettingsHelper { private SettingsManager SettingsManager { get; } - private CoreBaseSettings CoreBaseSettings { get; } - - public FilesSettingsHelper(SettingsManager settingsManager, CoreBaseSettings coreBaseSettings) + private CoreBaseSettings CoreBaseSettings { get; } + private SetupInfo SetupInfo { get; } + + public FilesSettingsHelper(SettingsManager settingsManager, CoreBaseSettings coreBaseSettings, SetupInfo setupInfo) { SettingsManager = settingsManager; - CoreBaseSettings = coreBaseSettings; + CoreBaseSettings = coreBaseSettings; + SetupInfo = setupInfo; } public bool ConfirmDelete @@ -285,6 +288,11 @@ namespace ASC.Web.Files.Classes get => LoadForCurrentUser().DownloadTarGzSetting; } + public long ChunkUploadSize + { + get => SetupInfo.ChunkUploadSize; + } + private FilesSettings LoadForCurrentUser() { return SettingsManager.LoadForCurrentUser(); diff --git a/products/ASC.Files/Server/Program.cs b/products/ASC.Files/Server/Program.cs index a113b31af3..302baa18db 100644 --- a/products/ASC.Files/Server/Program.cs +++ b/products/ASC.Files/Server/Program.cs @@ -24,7 +24,7 @@ namespace ASC.Files await host.RunAsync(); } - public static IHostBuilder CreateHostBuilder(string[] args) => + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .UseSystemd() .UseWindowsService() @@ -35,6 +35,11 @@ namespace ASC.Files builder.ConfigureKestrel((hostingContext, serverOptions) => { + serverOptions.Limits.MaxRequestBodySize = 100 * 1024 * 1024; + serverOptions.Limits.MaxRequestBufferSize = 100 * 1024 * 1024; + serverOptions.Limits.MinRequestBodyDataRate = null; + serverOptions.Limits.MinResponseDataRate = null; + var kestrelConfig = hostingContext.Configuration.GetSection("Kestrel"); if (!kestrelConfig.Exists()) return; diff --git a/thirdparty/websocket-sharp-master/websocket-sharp/websocket-sharp.csproj b/thirdparty/websocket-sharp-master/websocket-sharp/websocket-sharp.csproj index db52fc2232..5fb50d60fc 100644 --- a/thirdparty/websocket-sharp-master/websocket-sharp/websocket-sharp.csproj +++ b/thirdparty/websocket-sharp-master/websocket-sharp/websocket-sharp.csproj @@ -24,7 +24,7 @@ http://sta.github.io/websocket-sharp false true - 1.0.3-rc11 + 1.0.3-rc12 1.0.2.59611 1.0.2.59611 MIT diff --git a/web/ASC.Web.Core/SetupInfo.cs b/web/ASC.Web.Core/SetupInfo.cs index 41caa64deb..74092e462d 100644 --- a/web/ASC.Web.Core/SetupInfo.cs +++ b/web/ASC.Web.Core/SetupInfo.cs @@ -153,7 +153,7 @@ namespace ASC.Web.Studio.Core AvailableFileSize = GetAppSettings("web.available-file-size", 100L * 1024L * 1024L); TeamlabSiteRedirect = GetAppSettings("web.teamlab-site", string.Empty); - ChunkUploadSize = GetAppSettings("files.uploader.chunk-size", 5 * 1024 * 1024); + ChunkUploadSize = GetAppSettings("files:uploader:chunk-size", 10 * 1024 * 1024); ThirdPartyAuthEnabled = string.Equals(GetAppSettings("web.thirdparty-auth", "true"), "true"); ThirdPartyBannerEnabled = string.Equals(GetAppSettings("web.thirdparty-banner", "false"), "true"); NoTenantRedirectURL = GetAppSettings("web.notenant-url", "");