mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
added additional error messages about the proxy if the download fails per issue #136
Former-commit-id: 7a5dcc58ab959a70b7e086a984f5d9289d749b99
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.owasp.dependencycheck.data.update.exception.UpdateException;
|
import org.owasp.dependencycheck.data.update.exception.UpdateException;
|
||||||
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
import org.owasp.dependencycheck.utils.DownloadFailedException;
|
||||||
|
import org.owasp.dependencycheck.utils.Settings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class responsible for updating the NVD CVE and CPE data stores.
|
* Class responsible for updating the NVD CVE and CPE data stores.
|
||||||
@@ -54,7 +55,11 @@ public class NvdCveUpdater implements CachedWebDataSource {
|
|||||||
LOGGER.log(Level.FINE, null, ex);
|
LOGGER.log(Level.FINE, null, ex);
|
||||||
} catch (DownloadFailedException ex) {
|
} catch (DownloadFailedException ex) {
|
||||||
LOGGER.log(Level.WARNING,
|
LOGGER.log(Level.WARNING,
|
||||||
"Unable to download the NVD CVE data, unable to update the data to use the most current data.");
|
"Unable to download the NVD CVE data; the results may not include the most recent CPE/CVEs from the NVD.");
|
||||||
|
if (Settings.getString(Settings.KEYS.PROXY_SERVER) == null) {
|
||||||
|
LOGGER.log(Level.INFO,
|
||||||
|
"If you are behind a proxy you may need to configure dependency-check to use the proxy.");
|
||||||
|
}
|
||||||
LOGGER.log(Level.FINE, null, ex);
|
LOGGER.log(Level.FINE, null, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,6 +188,10 @@ public class DownloadTask implements Callable<Future<ProcessTask>> {
|
|||||||
} catch (DownloadFailedException ex) {
|
} catch (DownloadFailedException ex) {
|
||||||
msg = String.format("Download Failed for NVD CVE - %s%nSome CVEs may not be reported.", nvdCveInfo.getId());
|
msg = String.format("Download Failed for NVD CVE - %s%nSome CVEs may not be reported.", nvdCveInfo.getId());
|
||||||
LOGGER.log(Level.WARNING, msg);
|
LOGGER.log(Level.WARNING, msg);
|
||||||
|
if (Settings.getString(Settings.KEYS.PROXY_SERVER) == null) {
|
||||||
|
LOGGER.log(Level.INFO,
|
||||||
|
"If you are behind a proxy you may need to configure dependency-check to use the proxy.");
|
||||||
|
}
|
||||||
LOGGER.log(Level.FINE, null, ex);
|
LOGGER.log(Level.FINE, null, ex);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user