Working auth with storing data in pgsql#119
Open
emcifuntik wants to merge 5 commits intonaim94a:masterfrom
Open
Working auth with storing data in pgsql#119emcifuntik wants to merge 5 commits intonaim94a:masterfrom
emcifuntik wants to merge 5 commits intonaim94a:masterfrom
Conversation
naim94a
requested changes
Dec 18, 2023
Owner
naim94a
left a comment
There was a problem hiding this comment.
Thanks for this PR!
My primary concern is how unauthenticated/IDA<8 users would be handled.
| CREATE UNIQUE INDEX IF NOT EXISTS funcs_db ON funcs(chksum, db_id); | ||
| CREATE INDEX IF NOT EXISTS funcs_ranking ON funcs(chksum,rank); | ||
| CREATE INDEX IF NOT EXISTS func_chksum ON funcs(chksum); | ||
|
|
Owner
There was a problem hiding this comment.
This should be in a new database migration. (see diesel-cli migration generate)
| return Ok(()); | ||
| } | ||
| } | ||
| else { |
Owner
There was a problem hiding this comment.
This would cause all users of IDA<8 to fail to connect, as creds would be None.
|
|
||
| let auth_state = state.db.auth_user(creds.username, creds.password).await; | ||
|
|
||
| if !auth_state.is_ok() || !auth_state.unwrap() { |
Owner
There was a problem hiding this comment.
auth_state.unwrap would allow a temporary database failure to cause a panic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.