Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1725

kerberos module makes incorrect null checks for user information

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • kerberos-1.1.0
    • Affects Version/s: Not Applicable
    • Component/s: kerberos
    • None

      From the ticket:

       

      In kerberos_sspi.cc you check for user to be null .... but it never is because it is the results of a std::string c_str() call. So, instead of saying:
      
      if (user) {
      
      you need to say
      
      if (ulen > 0){
      
      The following 2 lines need modifying:
        - https://github.com/mongodb-js/kerberos/blob/master/src/win32/kerberos_sspi.cc#L71
        - https://github.com/mongodb-js/kerberos/blob/master/src/win32/kerberos_sspi.cc#L95

       

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: