diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-29 09:05:00 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-29 09:05:00 +0000 |
commit | 01512192090af8694f4e0ab2be9e47447869627b (patch) | |
tree | d1da7cf432e17ec972a97cbefd7151708cca0219 /mono-5.18.0-sharpziplib-parent-path-traversal.patch | |
parent | a40f344f9466a0470cfc97424fd83b59bf88a02a (diff) |
automatic import of mono
Diffstat (limited to 'mono-5.18.0-sharpziplib-parent-path-traversal.patch')
-rw-r--r-- | mono-5.18.0-sharpziplib-parent-path-traversal.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mono-5.18.0-sharpziplib-parent-path-traversal.patch b/mono-5.18.0-sharpziplib-parent-path-traversal.patch new file mode 100644 index 0000000..8f5bdc3 --- /dev/null +++ b/mono-5.18.0-sharpziplib-parent-path-traversal.patch @@ -0,0 +1,12 @@ +--- a/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs 2019-02-21 05:54:25.493666036 +0000 ++++ b/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs 2019-02-21 05:55:01.494273426 +0000 +@@ -375,7 +375,8 @@ +
+ targetName = Path.Combine(targetDirectory, entryFileName);
+ dirName = Path.GetDirectoryName(Path.GetFullPath(targetName));
+-
++ if (!Path.GetFullPath(targetName).StartsWith(targetDirectory, StringComparison.InvariantCultureIgnoreCase))
++ throw new ZipException("Parent traversal in paths is not allowed");
+ doExtraction = doExtraction && (entryFileName.Length > 0);
+ }
+
|