diff options
author | Kim van der Riet <kpvdr@apache.org> | 2009-10-29 13:20:07 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2009-10-29 13:20:07 +0000 |
commit | 93e2dbae88c8960b82f46e499b5d91c20547702f (patch) | |
tree | af30241c5d49bfb1dcab3e7c1cbc1ed1700faa3f /cpp/src/qpid/broker/SessionAdapter.cpp | |
parent | b59dc7fe0a39f24b00f7378e1edc2b707c74ddf8 (diff) | |
download | qpid-python-93e2dbae88c8960b82f46e499b5d91c20547702f.tar.gz |
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
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Exchange::shared_ptr, bool> response = getBroker().getExchanges().declare(exchange, type, durable, args); |