Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Redact license keys in environment variables from log output (#34711)

Peter Tripp6a24b2479cdd
diff --git a/crates/util/src/redact.rs b/crates/util/src/redact.rs
index 0b979fb4132..6b297dfb58b 100644
--- a/crates/util/src/redact.rs
+++ b/crates/util/src/redact.rs
@@ -1,7 +1,14 @@
/// Whether a given environment variable name should have its value redacted
pub fn should_redact(env_var_name: &str) -> bool {
- const REDACTED_SUFFIXES: &[&str] =
- &["KEY", "TOKEN", "PASSWORD", "SECRET", "PASS", "CREDENTIALS"];
+ const REDACTED_SUFFIXES: &[&str] = &[
+ "KEY",
+ "TOKEN",
+ "PASSWORD",
+ "SECRET",
+ "PASS",
+ "CREDENTIALS",
+ "LICENSE",
+ ];
REDACTED_SUFFIXES
.iter()
.any(|suffix| env_var_name.ends_with(suffix))