Skip to content

Commit

Permalink
fix: security vulnerability SSRF (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
vran-dev authored Jul 29, 2022
1 parent 4df8f9b commit 226c20e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private File download(String driverFileUrl, String parentDir) {
try {
Files.createDirectories(parentDirPath);
} catch (IOException e) {
log.error("下载驱动时创建目录失败", e);
log.error("create directory for driver failed", e);
throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e);
}

Expand Down Expand Up @@ -97,8 +97,9 @@ private File download(String driverFileUrl, String parentDir) {
}
});
} catch (RestClientException e) {
log.error(parentDir + " download driver error", e);
throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(e.getMessage());
String msg = String.format("download driver from %s to %s failed", driverFileUrl, parentDir);
log.error(msg, e);
throw DomainErrors.DOWNLOAD_DRIVER_ERROR.exception(msg);
}
}

Expand Down

0 comments on commit 226c20e

Please sign in to comment.