mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 11:04:31 -05:00
recompile user delete sproc and extend timeout. filer out security stamp errors from logger.
This commit is contained in:
parent
8eb545a37c
commit
6f636603fb
@ -162,7 +162,16 @@ namespace Bit.Api
|
|||||||
if(!env.IsDevelopment())
|
if(!env.IsDevelopment())
|
||||||
{
|
{
|
||||||
loggerFactory.AddLoggr(
|
loggerFactory.AddLoggr(
|
||||||
LogLevel.Error,
|
(category, logLevel, eventId) =>
|
||||||
|
{
|
||||||
|
// Bad security stamp exception
|
||||||
|
if(category == typeof(JwtBearerMiddleware).FullName && eventId.Id == 3 && logLevel == LogLevel.Error)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return logLevel >= LogLevel.Error;
|
||||||
|
},
|
||||||
globalSettings.Loggr.LogKey,
|
globalSettings.Loggr.LogKey,
|
||||||
globalSettings.Loggr.ApiKey);
|
globalSettings.Loggr.ApiKey);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,14 @@ namespace Bit.Core.Repositories.SqlServer
|
|||||||
|
|
||||||
public override async Task DeleteAsync(User user)
|
public override async Task DeleteAsync(User user)
|
||||||
{
|
{
|
||||||
await base.DeleteAsync(user);
|
using(var connection = new SqlConnection(ConnectionString))
|
||||||
|
{
|
||||||
|
await connection.ExecuteAsync(
|
||||||
|
$"[{Schema}].[{Table}_DeleteById]",
|
||||||
|
new { Id = user.Id },
|
||||||
|
commandType: CommandType.StoredProcedure,
|
||||||
|
commandTimeout: 60);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
CREATE PROCEDURE [dbo].[User_DeleteById]
|
CREATE PROCEDURE [dbo].[User_DeleteById]
|
||||||
@Id UNIQUEIDENTIFIER
|
@Id UNIQUEIDENTIFIER
|
||||||
|
WITH RECOMPILE
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
|
Loading…
x
Reference in New Issue
Block a user