summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-10-18 11:51:07 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-10-18 11:51:07 +0100
commitf4d21273da86345c310120d5b57cebb23941e3e9 (patch)
tree5b55584b0fe38341d5e907ccd38e6f5cae19cdb6
parent69f6b965b479e1d30c3e2293d03858d3f6086c9d (diff)
downloadrabbitmq-server-f4d21273da86345c310120d5b57cebb23941e3e9.tar.gz
Permit neither the source or destination of the binding to be the default exchange
-rw-r--r--src/rabbit_channel.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 6b35a00a..be17742c 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -936,6 +936,7 @@ binding_action(Fun, ExchangeNameBin, DestinationType, DestinationNameBin,
{DestinationName, ActualRoutingKey} =
expand_binding(DestinationType, DestinationNameBin, RoutingKey, State),
check_write_permitted(DestinationName, State),
+ check_not_default_exchange(DestinationName),
ExchangeName = rabbit_misc:r(VHostPath, exchange, ExchangeNameBin),
check_not_default_exchange(ExchangeName),
check_read_permitted(ExchangeName, State),