SERVER-136202ClosedFixed
Potential null pointer dereference in document_source_list_local_sessions.cpp
I found a potential null pointer dereference in {{{}src/mongo/db/pipeline/document_source_list_local_sessions.cpp{}}}. [https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/document_source_list_local_sessions.cpp#L77-L102] In the {{listSessionsRequiredPrivileges}} function, the return value of {{Client::getCurrent()->getOperationContext()}} is passed to {{getUserNameForLoggedInUser()}} without being checked for nullptr: {{const auto& myName = getUserNameForLoggedInUse