v0.7 Issues for Hotfix (#1812)
* Fix signalr admin messages sending (#1809) * Changed messsage hub to use userIds * SignalR events are fixed * Fixed broken advanced tab on library settings * Fixed regex timeout security issues. * Added a migration for GMT+1 users where their UTC dates were getting broken somehow. * Removed a console.log * Fixed a migration name --------- Co-authored-by: Snd-R <76580768+Snd-R@users.noreply.github.com>
This commit is contained in:
parent
dcf295c448
commit
8df134e7c3
14 changed files with 185 additions and 42 deletions
|
|
@ -216,7 +216,7 @@ public class BookmarkService : IBookmarkService
|
|||
foreach (var chapter in chapters)
|
||||
{
|
||||
var newFile = await SaveAsWebP(coverDirectory, chapter.CoverImage, coverDirectory);
|
||||
chapter.CoverImage = newFile;
|
||||
chapter.CoverImage = Path.GetFileName(newFile);
|
||||
_unitOfWork.ChapterRepository.Update(chapter);
|
||||
await _unitOfWork.CommitAsync();
|
||||
await _eventHub.SendMessageAsync(MessageFactory.NotificationProgress,
|
||||
|
|
@ -272,7 +272,6 @@ public class BookmarkService : IBookmarkService
|
|||
{
|
||||
// Convert target file to webp then delete original target file and update bookmark
|
||||
|
||||
var originalFile = filename;
|
||||
try
|
||||
{
|
||||
var targetFile = await _imageService.ConvertToWebP(fullSourcePath, fullTargetDirectory);
|
||||
|
|
@ -283,7 +282,7 @@ public class BookmarkService : IBookmarkService
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Could not convert image {FilePath}", filename);
|
||||
newFilename = originalFile;
|
||||
newFilename = filename;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -90,9 +90,11 @@ public class DirectoryService : IDirectoryService
|
|||
|
||||
private static readonly Regex ExcludeDirectories = new Regex(
|
||||
@"@eaDir|\.DS_Store|\.qpkg|__MACOSX|@Recently-Snapshot|@recycle",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase,
|
||||
Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
private static readonly Regex FileCopyAppend = new Regex(@"\(\d+\)",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase,
|
||||
Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
public static readonly string BackupDirectory = Path.Join(Directory.GetCurrentDirectory(), "config", "backups");
|
||||
|
||||
public DirectoryService(ILogger<DirectoryService> logger, IFileSystem fileSystem)
|
||||
|
|
@ -203,7 +205,8 @@ public class DirectoryService : IDirectoryService
|
|||
|
||||
if (fileNameRegex != string.Empty)
|
||||
{
|
||||
var reSearchPattern = new Regex(fileNameRegex, RegexOptions.IgnoreCase);
|
||||
var reSearchPattern = new Regex(fileNameRegex, RegexOptions.IgnoreCase,
|
||||
Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
return FileSystem.Directory.EnumerateFiles(path, "*", searchOption)
|
||||
.Where(file =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue