[rabbitmq-discuss] Missing ^ on access control doc page regex example?

James Gardner james.gardner at noaa.gov
Mon Mar 18 16:22:23 GMT 2013


In the RabbitMQ.com documentation, under Access Control, paragraph six, 
it gives this as an example of a regex:
'^amq\.gen.*|amq\.default$'

to 'give a user access to server-generated names and the default exchange.'
But this would give access to any entity that ended in 'amq.default', 
not just 'amq.default'.

Shouldn't it be
'^amq\.gen.*|^amq\.default$'
or
'^(amq\.gen.*|amq\.default)$'

It's an unlikely name for a user entity, so although it's not a big deal 
in that way, the way it's written is misleading; it might throw someone 
who is not quite as familiar with regex; I am reasonably familiar and I 
started writing some permission expressions the same way without 
thinking about it :)
Am I wrong?
Thanks,
James Gardner


More information about the rabbitmq-discuss mailing list