Navigation Menu

Skip to content

Commit

Permalink
Remove unneeded case statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmorrow authored and Vagabond committed Sep 20, 2013
1 parent ce320ff commit 7e9088e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/riak_core_security.erl
Expand Up @@ -557,21 +557,15 @@ validate_options(Options) ->
undefined ->
{ok, Options};
Pass ->
case validate_password_option(Pass, Options) of
{ok, NewOptions} ->
%% Do not continue to store the plaintext password
{ok, NewOptions};
{error, _E} ->
{error, _E}
end
validate_password_option(Pass, Options)
end.

%% Handle 'password' option if given
validate_password_option(Pass, Options) ->
lager:info("Hashing password: ~p", [Pass]),
case riak_core_pw_auth:hash_password(Pass) of
{ok, HashedPass, AuthName, HashFunction, Salt, Iterations} ->
%% Add to options
%% Add to options, replacing plaintext password
NewOptions = stash("password", {"password",
[{hash_pass, HashedPass},
{auth_name, AuthName},
Expand Down

0 comments on commit 7e9088e

Please sign in to comment.