From 3a112539ec2a65a2d8ab58b6f96f7255bd573903 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 14 Nov 2012 11:21:18 +0000 Subject: NO-JIRA: Fail on invalid PLAIN request git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1409161 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/NullSaslServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/NullSaslServer.cpp b/cpp/src/qpid/NullSaslServer.cpp index 8f415ba3ba..40bd9ebbc6 100644 --- a/cpp/src/qpid/NullSaslServer.cpp +++ b/cpp/src/qpid/NullSaslServer.cpp @@ -39,7 +39,10 @@ NullSaslServer::Status NullSaslServer::start(const std::string& mechanism, const } else if (i != std::string::npos) { //authorization id is first null delimited field uid = response->substr(0, i); - }//else not a valid SASL PLAIN response, throw error? + } else { + QPID_LOG(error, "Invalid PLAIN request, null delimiter not found in response data"); + return FAIL; + } if (!uid.empty()) { //append realm if it has not already been added i = uid.find(realm); -- cgit v1.2.1