You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/05/04 18:48:58 UTC

[GitHub] [couchdb] iilyak commented on a change in pull request #3541: Fix bug in replicator authentication for password contains @

iilyak commented on a change in pull request #3541:
URL: https://github.com/apache/couchdb/pull/3541#discussion_r626023338



##########
File path: src/couch_replicator/src/couch_replicator_auth_session.erl
##########
@@ -288,7 +288,9 @@ extract_creds_from_url(Url) ->
             Prefix = lists:concat([Proto, "://", User, ":", Pass, "@"]),
             Suffix = lists:sublist(Url, length(Prefix) + 1, length(Url) + 1),
             NoCreds = lists:concat([Proto, "://", Suffix]),
-            {ok, User, Pass, NoCreds}
+            User1 = mochiweb_util:unquote(User),
+            Pass1 = mochiweb_util:unquote(Pass),

Review comment:
       I think we should call [`chttpd:unquote/1`](https://github.com/apache/couchdb/blob/main/src/chttpd/src/chttpd.erl#L678) here instead. This would make moving away from mochiweb framework easier in the future.




-- 
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:
users@infra.apache.org