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
commit7a026dd587a5e6e2618e5d812f6b58364b112293 (patch)
tree5b55584b0fe38341d5e907ccd38e6f5cae19cdb6
parent857f1d95583be1d15309a3738f63238a1706f45f (diff)
downloadrabbitmq-server-git-7a026dd587a5e6e2618e5d812f6b58364b112293.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 6b35a00a53..be17742ceb 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),