Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1551

Uninformative error message when auth source is empty

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.10.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible

      When auth_source is specified in URI and the value is empty, one gets this exception:

        2) kerberos authentication when canonicalize_host_name is true correctly authenticates when using the IP
           Failure/Error: ::URI.decode(value)
           
           NoMethodError:
             undefined method `gsub' for nil:NilClass
           # ./lib/mongo/uri.rb:404:in `decode'
           # ./lib/mongo/uri.rb:565:in `auth_source'
           # ./lib/mongo/uri.rb:491:in `apply_transform'
           # ./lib/mongo/uri.rb:545:in `add_uri_option'
           # ./lib/mongo/uri.rb:336:in `block in parse_uri_options!'
           # ./lib/mongo/uri.rb:329:in `each'
           # ./lib/mongo/uri.rb:329:in `reduce'
           # ./lib/mongo/uri.rb:329:in `parse_uri_options!'
           # ./lib/mongo/uri.rb:323:in `parse_db_opts!'
           # ./lib/mongo/uri.rb:303:in `parse!'
           # ./lib/mongo/uri.rb:258:in `initialize'
           # ./lib/mongo/uri.rb:219:in `new'
           # ./lib/mongo/uri.rb:219:in `get'
           # ./lib/mongo/client.rb:307:in `initialize'
           # ./spec/enterprise_auth/kerberos_spec.rb:25:in `new'
           # ./spec/enterprise_auth/kerberos_spec.rb:25:in `block (2 levels) in <top (required)>'
           # ./spec/enterprise_auth/kerberos_spec.rb:35:in `block (2 levels) in <top (required)>'
           # ./spec/enterprise_auth/kerberos_spec.rb:53:in `block (3 levels) in <top (required)>'
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: