]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Rename k_redacted_password to k_redacted_secret
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 22 Nov 2025 14:55:58 +0000 (15:55 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 6 Dec 2025 13:56:18 +0000 (14:56 +0100)
src/ccache/storage/remote/httpstorage.cpp
src/ccache/storage/remote/redisstorage.cpp
src/ccache/storage/storage.cpp
src/ccache/storage/storage.hpp

index d3aacc582d53c827d9296e1bc6059b7d27e388e6..be4d7afea83b4fd618ce70dcd1ecbab94d5a9d16 100644 (file)
@@ -321,8 +321,8 @@ HttpStorage::redact_secrets(std::vector<Backend::Attribute>& attributes) const
       return attr.key == "bearer-token";
     });
   if (bearer_token_attribute != attributes.end()) {
-    bearer_token_attribute->value = storage::k_redacted_password;
-    bearer_token_attribute->raw_value = storage::k_redacted_password;
+    bearer_token_attribute->value = storage::k_redacted_secret;
+    bearer_token_attribute->raw_value = storage::k_redacted_secret;
   }
 }
 
index 531510166b3f604a6806a0024c0ba7034ac36c6b..bd163e7dcbd97c8fd9ea39b1b0f920daca254af1 100644 (file)
@@ -310,12 +310,12 @@ RedisStorageBackend::authenticate(const Url& url)
   if (password) {
     if (user) {
       // redis://user:password@host
-      LOG("Redis AUTH {} {}", *user, storage::k_redacted_password);
+      LOG("Redis AUTH {} {}", *user, storage::k_redacted_secret);
       util::value_or_throw<Failed>(
         redis_command("AUTH %s %s", user->c_str(), password->c_str()));
     } else {
       // redis://password@host
-      LOG("Redis AUTH {}", storage::k_redacted_password);
+      LOG("Redis AUTH {}", storage::k_redacted_secret);
       util::value_or_throw<Failed>(redis_command("AUTH %s", password->c_str()));
     }
   }
index 29501634fceddcd397b3352e7101753039eabad4..c9ce6c357d2ecdb74afdbcfaf8004d7a3763b695 100644 (file)
@@ -250,7 +250,7 @@ get_redacted_url_str_for_logging(const Url& url)
 {
   Url redacted_url(url);
   if (!url.user_info().empty()) {
-    redacted_url.user_info(k_redacted_password);
+    redacted_url.user_info(k_redacted_secret);
   }
   return redacted_url.str();
 }
index 6a8a9effd814a4f54563fb05f8335fa2bc66349a..5fa22edcc97fff8ae4642f3d721deda2ba18a234 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace storage {
 
-constexpr auto k_redacted_password = "********";
+constexpr auto k_redacted_secret = "********";
 
 std::vector<std::string> get_features();