mirror of
https://github.com/bitwarden/server.git
synced 2025-07-18 16:11:28 -05:00
Run dotnet format (#1764)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
using Bit.Core.Exceptions;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Services;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Services;
|
||||
|
@ -1,33 +1,33 @@
|
||||
using Bit.Core.Models.Data;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Dapper;
|
||||
using System.Globalization;
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Context;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Azure.Storage;
|
||||
using Microsoft.Azure.Storage.Blob;
|
||||
using Bit.Core.Models.Table;
|
||||
using IdentityModel;
|
||||
using System.Text.Json;
|
||||
using Bit.Core.Enums.Provider;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Azure.Storage.Queues;
|
||||
using Azure.Storage.Queues.Models;
|
||||
using System.Threading;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Enums.Provider;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Settings;
|
||||
using Dapper;
|
||||
using IdentityModel;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.Azure.Storage;
|
||||
using Microsoft.Azure.Storage.Blob;
|
||||
using MimeKit;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
@ -854,7 +854,7 @@ namespace Bit.Core.Utilities
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (providers.Any())
|
||||
{
|
||||
foreach (var group in providers.GroupBy(o => o.Type))
|
||||
@ -876,7 +876,7 @@ namespace Bit.Core.Utilities
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return claims;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Settings;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
using AspNetCoreRateLimit;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using AspNetCoreRateLimit;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -10,13 +10,13 @@ All rights reserved
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Core.Utilities.Duo
|
||||
|
@ -1,5 +1,5 @@
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Dynamic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using System;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Bit.Core.Settings;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@ -6,10 +10,6 @@ using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
using Serilog.Sinks.Syslog;
|
||||
using System;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Bit.Core.Settings;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
@ -83,7 +83,7 @@ namespace Bit.Core.Utilities
|
||||
{
|
||||
config.WriteTo.LocalSyslog(appName);
|
||||
}
|
||||
else if (Uri.TryCreate(globalSettings.Syslog.Destination,UriKind.Absolute, out var syslogAddress))
|
||||
else if (Uri.TryCreate(globalSettings.Syslog.Destination, UriKind.Absolute, out var syslogAddress))
|
||||
{
|
||||
// Syslog's standard port is 514 (both UDP and TCP). TLS does not have a standard port, so assume 514.
|
||||
int port = syslogAddress.Port >= 0
|
||||
@ -107,7 +107,7 @@ namespace Bit.Core.Utilities
|
||||
{
|
||||
config.WriteTo.TcpSyslog(syslogAddress.Host, port, appName,
|
||||
secureProtocols: protocols,
|
||||
certProvider: new CertificateStoreProvider(StoreName.My, StoreLocation.CurrentUser,
|
||||
certProvider: new CertificateStoreProvider(StoreName.My, StoreLocation.CurrentUser,
|
||||
globalSettings.Syslog.CertificateThumbprint));
|
||||
}
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Settings;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ namespace Bit.Core.Utilities
|
||||
if (provider == SupportedDatabaseProviders.Postgres)
|
||||
{
|
||||
options.UseNpgsql(connectionString);
|
||||
}
|
||||
}
|
||||
else if (provider == SupportedDatabaseProviders.MySql)
|
||||
{
|
||||
options.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
|
||||
|
@ -1,8 +1,8 @@
|
||||
using Bit.Core.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Models.StaticStore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
|
@ -8,8 +8,8 @@ namespace Bit.Core.Utilities
|
||||
{
|
||||
public StrictEmailAddressAttribute()
|
||||
: base("The {0} field is not a supported e-mail address format.")
|
||||
{}
|
||||
|
||||
{ }
|
||||
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
var emailAddress = value?.ToString();
|
||||
|
@ -15,7 +15,7 @@ namespace Bit.Core.Utilities
|
||||
{
|
||||
return new ValidationResult("An email is required.");
|
||||
}
|
||||
|
||||
|
||||
if (emails.Count() > 20)
|
||||
{
|
||||
return new ValidationResult("You can only submit up to 20 emails at a time.");
|
||||
|
Reference in New Issue
Block a user