File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -233,19 +233,19 @@ def load_custom_sdkconfig_file():
233
233
# Handle HTTP/HTTPS URLs
234
234
if "http" in file_entry and "://" in file_entry :
235
235
url = file_entry .split (" " )[0 ]
236
- # Path Traversal protection
237
- if contains_path_traversal (url ):
238
- print (f"Path Traversal detected: { url } check your URL path" )
239
- else :
240
- try :
241
- response = requests .get (file_entry .split (" " )[0 ])
242
- if response .ok :
243
- return response .content .decode ('utf-8' )
244
- except requests .RequestException as e :
245
- print (f"Error downloading { file_entry } : { e } " )
246
- except UnicodeDecodeError as e :
247
- print (f"Error decoding response from { file_entry } : { e } " )
248
- return ""
236
+ # Path Traversal protection
237
+ if contains_path_traversal (url ):
238
+ print (f"Path Traversal detected: { url } check your URL path" )
239
+ else :
240
+ try :
241
+ response = requests .get (file_entry .split (" " )[0 ])
242
+ if response .ok :
243
+ return response .content .decode ('utf-8' )
244
+ except requests .RequestException as e :
245
+ print (f"Error downloading { file_entry } : { e } " )
246
+ except UnicodeDecodeError as e :
247
+ print (f"Error decoding response from { file_entry } : { e } " )
248
+ return ""
249
249
250
250
# Handle local files
251
251
if "file://" in file_entry :
You can’t perform that action at this time.
0 commit comments