Commit 63d943b
fix: Fix path traversal vulnerability in zip extraction (bug #232873)
- Replace single-pass "../" removal with loop to remove all occurrences
- Add final path validation to ensure extracted files stay within target directory
Log: fix CITIVD
Bug: https://pms.uniontech.com/bug-view-342883.html1 parent e8724af commit 63d943b
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
765 | | - | |
| 764 | + | |
| 765 | + | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
863 | 872 | | |
864 | 873 | | |
865 | 874 | | |
| |||
0 commit comments