mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Extract tar files with "data" filter in Windows build scripts (#8606)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									feeacf46ad
								
							
						
					
					
						commit
						de8335ba8f
					
				|  | @ -7,6 +7,7 @@ import re | |||
| import shutil | ||||
| import struct | ||||
| import subprocess | ||||
| import sys | ||||
| from typing import Any | ||||
| 
 | ||||
| 
 | ||||
|  | @ -507,7 +508,10 @@ def extract_dep(url: str, filename: str, prefs: dict[str, str]) -> None: | |||
|                 if sources_dir_abs != member_prefix: | ||||
|                     msg = "Attempted Path Traversal in Tar File" | ||||
|                     raise RuntimeError(msg) | ||||
|             tgz.extractall(sources_dir) | ||||
|             if sys.version_info >= (3, 12): | ||||
|                 tgz.extractall(sources_dir, filter="data") | ||||
|             else: | ||||
|                 tgz.extractall(sources_dir) | ||||
|     else: | ||||
|         msg = "Unknown archive type: " + filename | ||||
|         raise RuntimeError(msg) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user