candidate: do not log full IP addresses for related address

since this may contain sensitive data, just like the address.

BUG=None

Change-Id: I3faa1512a15467cd5cc4bcbcaebadb736f1bae07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40473}
diff --git a/api/candidate.cc b/api/candidate.cc
index 53a4826..90cb326 100644
--- a/api/candidate.cc
+++ b/api/candidate.cc
@@ -78,11 +78,12 @@
   rtc::StringBuilder ost;
   std::string address =
       sensitive ? address_.ToSensitiveString() : address_.ToString();
+  std::string related_address = sensitive ? related_address_.ToSensitiveString()
+                                          : related_address_.ToString();
   ost << "Cand[" << transport_name_ << ":" << foundation_ << ":" << component_
       << ":" << protocol_ << ":" << priority_ << ":" << address << ":" << type_
-      << ":" << related_address_.ToString() << ":" << username_ << ":"
-      << password_ << ":" << network_id_ << ":" << network_cost_ << ":"
-      << generation_ << "]";
+      << ":" << related_address << ":" << username_ << ":" << password_ << ":"
+      << network_id_ << ":" << network_cost_ << ":" << generation_ << "]";
   return ost.Release();
 }