mirror of
				https://github.com/vran-dev/databasir.git
				synced 2025-11-04 16:26:10 +08:00 
			
		
		
		
	fix: security vulnerability SSRF (#256)
This commit is contained in:
		@@ -60,7 +60,7 @@ public class DriverResources {
 | 
				
			|||||||
        try {
 | 
					        try {
 | 
				
			||||||
            Files.createDirectories(parentDirPath);
 | 
					            Files.createDirectories(parentDirPath);
 | 
				
			||||||
        } catch (IOException e) {
 | 
					        } catch (IOException e) {
 | 
				
			||||||
            log.error("下载驱动时创建目录失败", e);
 | 
					            log.error("create directory for driver failed", e);
 | 
				
			||||||
            throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e);
 | 
					            throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -97,8 +97,9 @@ public class DriverResources {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } catch (RestClientException e) {
 | 
					        } catch (RestClientException e) {
 | 
				
			||||||
            log.error(parentDir + " download driver error", e);
 | 
					            String msg = String.format("download driver from %s to %s failed", driverFileUrl, parentDir);
 | 
				
			||||||
            throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e.getMessage());
 | 
					            log.error(msg, e);
 | 
				
			||||||
 | 
					            throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(msg);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user