From 93e2dbae88c8960b82f46e499b5d91c20547702f Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Thu, 29 Oct 2009 13:20:07 +0000 Subject: Fix for QPID-2171 "No checks made for reserved exchange names "amq.*" and "qpid.*". This checkin adds the qpid check, r.830751 added the amq check. Python tests also inlcuded which checks for these prefixes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@830930 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionAdapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index 1a802cb2bd..5e5d79343a 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -85,8 +85,8 @@ void SessionAdapter::ExchangeHandlerImpl::declare(const string& exchange, const checkType(actual, type); checkAlternate(actual, alternate); }else{ - if(exchange.find("amq.") == 0) { - throw framing::NotAllowedException(QPID_MSG("Exchange names beginning with \"amq.\" are reserved. (exchange=\"" << exchange << "\")")); + if(exchange.find("amq.") == 0 || exchange.find("qpid.") == 0) { + throw framing::NotAllowedException(QPID_MSG("Exchange names beginning with \"amq.\" or \"qpid.\" are reserved. (exchange=\"" << exchange << "\")")); } try{ std::pair response = getBroker().getExchanges().declare(exchange, type, durable, args); -- cgit v1.2.1