aboutsummaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authorPhilipp Hancke <philipp.hancke@googlemail.com>2021-03-15 08:50:53 +0100
committerCommit Bot <commit-bot@chromium.org>2021-03-15 10:04:21 +0000
commitb6bc357a1eef04a69bbd0c6e100b99c7618d84a6 (patch)
tree9b207e7214286357f60f7211781e7f42da77a5da /p2p
parent6097b0fac0946a29d59a9266ea656c39b3fd7336 (diff)
downloadwebrtc-b6bc357a1eef04a69bbd0c6e100b99c7618d84a6.tar.gz
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 <philipp.hancke@googlemail.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33457}
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/turn_port.h4
1 files changed, 4 insertions, 0 deletions
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.