diff options
| author | Gordon Sim <gsim@apache.org> | 2013-09-25 11:28:19 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-09-25 11:28:19 +0000 |
| commit | de211a2a8a15f31c80d50c292960938f51fb4241 (patch) | |
| tree | 54d64fea92fedc9d72b229fdc3dee09cc94ced37 /cpp/src | |
| parent | 090d36c77622a2ae323b5714fb0089e4ba6b4001 (diff) | |
| download | qpid-python-de211a2a8a15f31c80d50c292960938f51fb4241.tar.gz | |
QPID-5150: further fixes for QMFv2 over AMQP 1.0; use content from converted 0-10 transfer rather than message as received
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1526156 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/management/ManagementAgent.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp index d80dd6e6a3..d4a07f407c 100644 --- a/cpp/src/qpid/management/ManagementAgent.cpp +++ b/cpp/src/qpid/management/ManagementAgent.cpp @@ -2122,19 +2122,21 @@ bool ManagementAgent::authorizeAgentMessage(Message& msg) string methodName; string cid; + boost::intrusive_ptr<const qpid::broker::amqp_0_10::MessageTransfer> transfer = protocols->translate(msg); // - // If the message is larger than our working buffer size, we can't determine if it's - // authorized or not. In this case, return true (authorized) if there is no ACL in place, - // otherwise return false; + // If the message is larger than our working buffer size (or if it + // could not be converted to an 0-10 messgae-transfer), we can't + // determine if it's authorized or not. In this case, return true + // (authorized) if there is no ACL in place, otherwise return + // false; // - if (msg.getContentSize() > qmfV1BufferSize) + if (!transfer || transfer->getContentSize() > qmfV1BufferSize) return broker->getAcl() == 0; - inBuffer.putRawData(msg.getContent()); + inBuffer.putRawData(transfer->getContent()); uint32_t bufferLen = inBuffer.getPosition(); inBuffer.reset(); - boost::intrusive_ptr<const qpid::broker::amqp_0_10::MessageTransfer> transfer = protocols->translate(msg); const framing::MessageProperties* p = transfer ? transfer->getFrames().getHeaders()->get<framing::MessageProperties>() : 0; @@ -2283,13 +2285,13 @@ void ManagementAgent::dispatchAgentCommand(Message& msg, bool viaLocal) ResizableBuffer inBuffer(qmfV1BufferSize); uint8_t opcode; - if (msg.getContentSize() > qmfV1BufferSize) { + if (transfer->getContentSize() > qmfV1BufferSize) { QPID_LOG(debug, "ManagementAgent::dispatchAgentCommandLH: Message too large: " << - msg.getContentSize()); + transfer->getContentSize()); return; } - inBuffer.putRawData(msg.getContent()); + inBuffer.putRawData(transfer->getContent()); uint32_t bufferLen = inBuffer.getPosition(); inBuffer.reset(); |
