summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-01-06 15:43:19 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-01-06 15:43:19 +0000
commit2e3f4c1a4e2ae72b364f9ca37ee0976ad5809d9c (patch)
treea296dda5abbea6ee9356bb70835ae3dfdf2be822
parent2f0bab317c4564f99f517670270c9db52ca91f5a (diff)
downloadrabbitmq-server-bug24265.tar.gz
Better comment.bug24265
-rw-r--r--src/rabbit_ssl.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl
index d9c8ac00..ff87d989 100644
--- a/src/rabbit_ssl.erl
+++ b/src/rabbit_ssl.erl
@@ -151,8 +151,10 @@ 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 >= 126 ->
- %% only U+0000 needs escaping, but for display purposes it's handy
- %% to escape all non-printable chars
+ %% Of ASCII characters only U+0000 needs escaping, but for display
+ %% purposes it's handy to escape all non-printable chars. All non-ASCII
+ %% characters get converted to UTF-8 sequences and then escaped. We've
+ %% already got a UTF-8 sequence here, so just escape it.
lists:flatten(io_lib:format("\\~2.16.0B", [C])) ++
escape_rdn_value(S, middle);
escape_rdn_value([C | S], middle) ->