Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: properly handle NULL hashedPassword column in system.users #48773

Merged
merged 2 commits into from May 13, 2020

Commits on May 13, 2020

  1. sql: properly handle NULL hashedPassword column in system.users

    Fixes cockroachdb#48769.
    
    Before this change, attempts to log in as a user with a NULL value
    in their "hashedPassword" column in the system.users table would
    cause the server to crash. This was because `retrieveUserAndPassword`
    was not properly handling NULL values.
    
    This change fixes this.
    
    Release note (bug fix): Manually writing a NULL value into the
    system.users table for the "hashedPassword" column will no longer
    cause a server crash during user authentication.
    nvanbenschoten committed May 13, 2020
    Configuration menu
    Copy the full SHA
    7901304 View commit details
    Browse the repository at this point in the history
  2. sql: properly handle nil byte slices in golangFillQueryArguments

    Before this, nil byte slices were being treated as empty byte slices,
    which resulted in confusing behavior where a nil byte slice passed to an
    InternalExecutor would not be NULL.
    
    Also, fix TestGolangQueryArgs, which was completely broken and asserting
    that `reflect.Type(*types.T) == reflect.Type(*types.T)`.
    
    This change is what caught the bug fixed by the previous change.
    nvanbenschoten committed May 13, 2020
    Configuration menu
    Copy the full SHA
    9d64636 View commit details
    Browse the repository at this point in the history