Apply security patch for rustdoc

CVE number has not yet been assigned, patch made by steveklabnik.
This commit is contained in:
steveklabnik 2018-07-07 10:45:45 -06:00 committed by Mark Rousskov
parent e11d9ddb7d
commit 0d2d842eec

View file

@ -681,8 +681,14 @@ where R: 'static + Send,
}
}
if !plugins.is_empty() && plugin_path.is_none() {
eprintln!("ERROR: You must pass --plugin-path to use --plugins");
std::process::exit(1);
}
// Load all plugins/passes into a PluginManager
let path = plugin_path.unwrap_or("/tmp/rustdoc/plugins".to_string());
let path = plugin_path.unwrap_or("/usr/lib64/rustdoc/plugins".to_string());
let mut pm = plugins::PluginManager::new(PathBuf::from(path));
for pass in &passes {
let plugin = match passes::PASSES.iter()