From b6bc357a1eef04a69bbd0c6e100b99c7618d84a6 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 15 Mar 2021 08:50:53 +0100 Subject: [PATCH] turn: add logging for long usernames BUG=chromium:1144646,chromium:1186539 Change-Id: Ib84b80f6e32b90c8ce4feebd8a9f5142af589141 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211860 Commit-Queue: Philipp Hancke Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/master@{#33457} --- p2p/base/turn_port.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/p2p/base/turn_port.h b/p2p/base/turn_port.h index 3a7915274a..349190b4ae 100644 --- a/p2p/base/turn_port.h +++ b/p2p/base/turn_port.h @@ -66,6 +66,8 @@ class TurnPort : public Port { webrtc::TurnCustomizer* customizer) { // Do basic parameter validation. if (credentials.username.size() > kMaxTurnUsernameLength) { + RTC_LOG(LS_ERROR) << "Attempt to use TURN with a too long username " + << "of length " << credentials.username.size(); return nullptr; } // Do not connect to low-numbered ports. The default STUN port is 3478. @@ -117,6 +119,8 @@ class TurnPort : public Port { rtc::SSLCertificateVerifier* tls_cert_verifier = nullptr) { // Do basic parameter validation. if (credentials.username.size() > kMaxTurnUsernameLength) { + RTC_LOG(LS_ERROR) << "Attempt to use TURN with a too long username " + << "of length " << credentials.username.size(); return nullptr; } // Do not connect to low-numbered ports. The default STUN port is 3478.