mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Some security issue found in scan.
This commit is contained in:
parent
70cc163cb0
commit
44c2af88ea
@ -403,20 +403,17 @@ namespace API.Parser
|
|||||||
|
|
||||||
public static bool IsArchive(string filePath)
|
public static bool IsArchive(string filePath)
|
||||||
{
|
{
|
||||||
var fileInfo = new FileInfo(filePath);
|
return MangaFileRegex.IsMatch(Path.GetExtension(filePath));
|
||||||
return MangaFileRegex.IsMatch(fileInfo.Extension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsImage(string filePath)
|
public static bool IsImage(string filePath)
|
||||||
{
|
{
|
||||||
var fileInfo = new FileInfo(filePath);
|
return ImageRegex.IsMatch(Path.GetExtension(filePath));
|
||||||
return ImageRegex.IsMatch(fileInfo.Extension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsXml(string filePath)
|
public static bool IsXml(string filePath)
|
||||||
{
|
{
|
||||||
var fileInfo = new FileInfo(filePath);
|
return XmlRegex.IsMatch(Path.GetExtension(filePath));
|
||||||
return XmlRegex.IsMatch(fileInfo.Extension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float MinimumNumberFromRange(string range)
|
public static float MinimumNumberFromRange(string range)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user