Skip to content

Commit 0d2d842

Browse files
steveklabnikMark-Simulacrum
authored andcommitted
Apply security patch for rustdoc
CVE number has not yet been assigned, patch made by steveklabnik.
1 parent e11d9dd commit 0d2d842

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustdoc/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,14 @@ where R: 'static + Send,
681681
}
682682
}
683683

684+
if !plugins.is_empty() && plugin_path.is_none() {
685+
eprintln!("ERROR: You must pass --plugin-path to use --plugins");
686+
std::process::exit(1);
687+
}
688+
689+
684690
// Load all plugins/passes into a PluginManager
685-
let path = plugin_path.unwrap_or("/tmp/rustdoc/plugins".to_string());
691+
let path = plugin_path.unwrap_or("/usr/lib64/rustdoc/plugins".to_string());
686692
let mut pm = plugins::PluginManager::new(PathBuf::from(path));
687693
for pass in &passes {
688694
let plugin = match passes::PASSES.iter()

0 commit comments

Comments
 (0)