File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,10 @@ def __enter__(self) -> list[str]:
133
133
sanitized_path = _sanitize_file_path (file_path )
134
134
temp_file_path = os .path .join (self .temp_base_dir , sanitized_path )
135
135
136
- # Ensure the normilized path is still within our temp directory
137
- normilized_temp_path = os .path .normpath (temp_file_path )
138
- normilized_base_path = os .path .normpath (self .temp_base_dir )
139
- if not normilized_temp_path .startswith (normilized_base_path + os .sep ):
136
+ # Ensure the normalized path is still within our temp directory
137
+ normalized_temp_path = os .path .normpath (temp_file_path )
138
+ normalized_base_path = os .path .normpath (self .temp_base_dir )
139
+ if not normalized_temp_path .startswith (normalized_base_path + os .sep ):
140
140
raise ValueError (f'Path escapes temporary directory: { file_path } ' )
141
141
142
142
os .makedirs (os .path .dirname (temp_file_path ), exist_ok = True )
You can’t perform that action at this time.
0 commit comments