davisp commented on a change in pull request #2888:
URL: https://github.com/apache/couchdb/pull/2888#discussion_r425430870



##########
File path: src/couch/src/couch_httpd_auth.erl
##########
@@ -209,11 +209,12 @@ jwt_authentication_handler(Req) ->
 
 get_configured_claims() ->
     Claims = config:get("jwt_auth", "required_claims", ""),
-    case re:split(Claims, "\s*,\s*", [{return, list}]) of
-        [[]] ->
-            []; %% if required_claims is the empty string.
-        List ->
-            [list_to_existing_atom(C) || C <- List]
+    case Claims of
+        "" ->
+            [];
+        Claims ->
+            {ok, Parsed} = couch_util:parse_term("[" ++ Claims ++ "]"),

Review comment:
       Not sure how much you care, but we don't usually mutate the value that 
we pass to parse_term (i.e., we require useres to add the square brackets in 
the config. Not sure if  we care or not?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to