summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-01-06 15:41:19 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-01-06 15:41:19 +0000
commit2f0bab317c4564f99f517670270c9db52ca91f5a (patch)
treed9e244470b29ca4d036d3cbb691087c59b23f976
parent1247c851699827711bb0beaf4aa9f05b2a51bf32 (diff)
downloadrabbitmq-server-2f0bab317c4564f99f517670270c9db52ca91f5a.tar.gz
RFC 4514 states that non-acsii chars get converted to UTF-8 and then escaped - e.g. U+00A3 POUND SIGN encodes as \C2\A3.
-rw-r--r--src/rabbit_ssl.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl
index b7ae797f..d9c8ac00 100644
--- a/src/rabbit_ssl.erl
+++ b/src/rabbit_ssl.erl
@@ -150,7 +150,7 @@ escape_rdn_value([$ ], middle) ->
escape_rdn_value([C | S], middle) when C =:= $"; C =:= $+; C =:= $,; C =:= $;;
C =:= $<; C =:= $>; C =:= $\\ ->
[$\\, C | escape_rdn_value(S, middle)];
-escape_rdn_value([C | S], middle) when C < 32 ; C =:= 127 ->
+escape_rdn_value([C | S], middle) when C < 32 ; C >= 126 ->
%% only U+0000 needs escaping, but for display purposes it's handy
%% to escape all non-printable chars
lists:flatten(io_lib:format("\\~2.16.0B", [C])) ++