Skip to content

Commit

Permalink
Reject characters below whitespace per @coderoshi
Browse files Browse the repository at this point in the history
  • Loading branch information
macintux committed May 14, 2014
1 parent 20e167c commit 1f3745f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yz_index.erl
Expand Up @@ -56,7 +56,7 @@ create(Name) ->
create(Name, ?YZ_DEFAULT_SCHEMA_NAME).

%% @see create/3
-spec create(index_name(), schema_name()) ->
-spec create(index_name(), schema_name()) ->
ok |
{error, schema_not_found} |
{error, invalid_name}.
Expand Down Expand Up @@ -262,7 +262,7 @@ schema_name(Info) ->
%% UTF-8 support is available
-spec verify_name(index_name()) -> {ok, index_name()} | {error, invalid_name}.
verify_name(Name) ->
case lists:dropwhile(fun(X) -> X < 128 end,
case lists:dropwhile(fun(X) -> X < 128 andalso X > 31 end,
binary_to_list(Name)) =:= "" of
true ->
case re:run(Name, "/", []) of
Expand Down

0 comments on commit 1f3745f

Please sign in to comment.