-
Notifications
You must be signed in to change notification settings - Fork 418
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
Fix speculativeAuthenticate
panic on empty database
#4178
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4178 +/- ##
==========================================
- Coverage 74.52% 73.81% -0.72%
==========================================
Files 339 339
Lines 22785 22786 +1
==========================================
- Hits 16981 16819 -162
- Misses 4498 4683 +185
+ Partials 1306 1284 -22
... and 19 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
speculativeAuthenticate
panic on empty database
With this fix an error is returned.
|
speculativeAuthenticate
panic on empty database speculativeAuthenticate
panic on empty database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Description
This panic is only visible on mechanism called
MONGODB-X509
. But it's nice to fix panic if you come across one 🤗Run FerretDB with
--test-enable-new-auth
flag.Run
mongosh
without database, use below mechanism, it won't panic for PLAIN or SCRAM.See panic, it appears because Op query seems to error on command error or lazyerror.
Since if
SpeculativeAuthenticate
does not succeed, it calls saslStart. If db is not set, return Op query withoutSpeculativeAuthenticate
field, the error is returned from saslStart.Closes #4100.
Readiness checklist
task all
, and it passed.@FerretDB/core
), Milestone (Next
), Labels, Project and project's Sprint fields.