Skip to content

Commit 589c1b5

Browse files
author
David Hull
committed
Convert user and password types in riakc_pb_socket:start_auth.
The #state.credentials field is declared as {User::string(), Password::string()} but the rpbauthreq record's user and password fields are declared as binary. Call iolist_to_binary to convert.
1 parent 7a4552d commit 589c1b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/riakc_pb_socket.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2272,8 +2272,8 @@ start_tls(State=#state{sock=Sock}) ->
22722272
end.
22732273

22742274
start_auth(State=#state{credentials={User,Pass}, sock=Sock}) ->
2275-
ok = ssl:send(Sock, riak_pb_codec:encode(#rpbauthreq{user=User,
2276-
password=Pass})),
2275+
ok = ssl:send(Sock, riak_pb_codec:encode(#rpbauthreq{user=iolist_to_binary(User),
2276+
password=iolist_to_binary(Pass)})),
22772277
receive
22782278
{ssl_error, Sock, Reason} ->
22792279
{error, Reason};

0 commit comments

Comments
 (0)