Bug 1004715 - CLI - any string is allowed to set for message selector on queue
Summary: CLI - any string is allowed to set for message selector on queue
Keywords:
Status: CLOSED DUPLICATE of bug 1004789
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Jeff Mesnil
QA Contact: Miroslav Novak
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 10:23 UTC by Miroslav Novak
Modified: 2013-09-18 19:54 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-18 06:46:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Novak 2013-09-05 10:23:57 UTC
Description of problem:
Using CLI is possible to set message selector on queue to any string value. Such selector does not have to correspond to message selector syntax.

How reproducible:

Add queue:

/subsystem=messaging/hornetq-server=default/jms-queue=testQueue:add(durable=true,entries=["java:jboss/exported/jms/queue/testQueue"]

Set message selector with bad value:

/subsystem=messaging/hornetq-server=default/jms-queue=testQueue:write-attribute(name=selector,value="dsa=AND$2==^#%!=fasd")
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

Expected results:
This should fail with description of proper grammar.

Comment 1 Jeff Mesnil 2013-09-05 10:26:35 UTC
HornetQ does not expose any functionality to determine the correctness of a message selector.

Either it needs to provide it or it should check it at runtime when the queue is created.

Comment 2 Miroslav Novak 2013-09-05 11:29:05 UTC
JMS specification 1.1 [1] describes message selector syntax  in chapter: 3.8.1.1 Message Selector Syntax

[1] http://docs.oracle.com/cd/E19957-01/816-5904-10/816-5904-10.pdf

Comment 3 Clebert Suconic 2013-09-17 21:22:13 UTC
I believe had already changed this on wildfly/master.

The issue here is that a queue's filter is a read only property.


Was this changed on 6.x as well?  if so, this is just a close

Comment 4 Miroslav Novak 2013-09-18 06:46:35 UTC
Yes, message-selector attribute should be read-only. Jeff has already created PR in bz#1004789.

I'll close this bz as duplicate.

*** This bug has been marked as a duplicate of bug 1004789 ***


Note You need to log in before you can comment on or make changes to this bug.