popojargo commented on a change in pull request #1827: Handle invalid user 
docid in changes_callback
URL: https://github.com/apache/couchdb/pull/1827#discussion_r245327478
 
 

 ##########
 File path: src/chttpd/src/chttpd_auth_cache.erl
 ##########
 @@ -160,9 +160,12 @@ changes_callback({change, {Change}}, _) ->
         <<"_design/", _/binary>> ->
             ok;
         DocId ->
-            UserName = username(DocId),
-            couch_log:debug("Invalidating cached credentials for ~s", 
[UserName]),
-            ets_lru:remove(?CACHE, UserName)
+            try
+                UserName = username(DocId),
+                couch_log:debug("Invalidating cached credentials for ~s", 
[UserName]),
+                ets_lru:remove(?CACHE, UserName)
 
 Review comment:
   I'll look into this this weekend. I would be indeed better to simply prevent 
the doc to enter the cache. Altought, if the user document is invalid, can we 
still use the user credentials to login? That's something I will check today. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to