mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Update Emby.Server.Implementations/Library/DefaultPasswordResetProvider.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
This commit is contained in:
parent
6be8624373
commit
b07c146fd9
@ -40,7 +40,10 @@ namespace Emby.Server.Implementations.Library
|
||||
HashSet<string> usersreset = new HashSet<string>();
|
||||
foreach (var resetfile in Directory.EnumerateFiles(_passwordResetFileBaseDir, $"{_passwordResetFileBaseName}*"))
|
||||
{
|
||||
var spr = await _jsonSerializer.DeserializeFromStreamAsync<SerializablePasswordReset>(File.OpenRead(resetfile)).ConfigureAwait(false);
|
||||
using (var str = File.OpenRead(resetfile))
|
||||
{
|
||||
var spr = await _jsonSerializer.DeserializeFromStreamAsync<SerializablePasswordReset>(str).ConfigureAwait(false);
|
||||
}
|
||||
if (spr.ExpirationDate < DateTime.Now)
|
||||
{
|
||||
File.Delete(resetfile);
|
||||
|
Loading…
Reference in New Issue
Block a user