[
https://issues.apache.org/jira/browse/ARTEMIS-2228?focusedWorklogId=184934&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-184934
]
ASF GitHub Bot logged work on ARTEMIS-2228:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jan/19 19:27
Start Date: 14/Jan/19 19:27
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on pull request #2497:
ARTEMIS-2228 Check message size sent over management API
URL: https://github.com/apache/activemq-artemis/pull/2497#discussion_r247625597
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AbstractControl.java
##########
@@ -67,6 +71,23 @@ protected void blockOnIO() {
}
+ /**
+ * This is used to limit the size of message that can be sent over
+ * management api. The message size shall be less than the journal
+ * buffer size.
+ * @param postOffice the PostOffice
+ * @param message the message to be checked
+ * @throws Exception if message size is over the limit.
+ */
+ protected void checkMessageSize(PostOffice postOffice, CoreMessage message)
throws Exception {
+ int msize = message.getPersistSize();
+ ActiveMQServer server = postOffice.getServer();
+ int journalBufferSize =
server.getConfiguration().getJournalBufferSize_AIO();
Review comment:
This is not right either. What if the current journal is NIO?
i would expect a simpler change here.. just convert it to large message.
Some protocols are already doing that.. let me check how that conversion is
done and i will get back to you here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 184934)
Time Spent: 40m (was: 0.5h)
> Check message size sent over management API
> -------------------------------------------
>
> Key: ARTEMIS-2228
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2228
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.6.3
> Reporter: Howard Gao
> Assignee: Howard Gao
> Priority: Major
> Fix For: 2.6.4
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Currently user can send an arbitrary size of messages via management api
> (console for example) and this may break the buffer size limit and cause the
> broker throw unexpected exceptions. We need to put some check on the message
> size over the management API and reject the message if it's too big.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)