noahshaw11 commented on a change in pull request #3637:
URL: https://github.com/apache/couchdb/pull/3637#discussion_r659992110
##########
File path: src/couch/src/couch_httpd_auth.erl
##########
@@ -99,27 +99,32 @@ special_test_authentication_handler(Req) ->
basic_name_pw(Req) ->
AuthorizationHeader = header_value(Req, "Authorization"),
case AuthorizationHeader of
- "Basic " ++ Base64Value ->
- try
- re:split(
- base64:decode(Base64Value),
- ":",
- [{return, list}, {parts, 2}]
- )
- of
- ["_", "_"] ->
- % special name and pass to be logged out
- nil;
- [User, Pass] ->
- {User, Pass};
- _ ->
- nil
- catch
- error:function_clause ->
- throw({bad_request, "Authorization header has invalid
base64 value"})
- end;
+ % undefined is sent during startup process
+ undefined ->
Review comment:
Your approach makes sense. See
https://github.com/apache/couchdb/pull/3637/commits/dd0b666e743f6466910b278000a865bb087da451.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]