Skip to content

Conversation

@emcifuntik
Copy link

No description provided.

Copy link
Owner

@naim94a naim94a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a new database migration. (see diesel-cli migration generate)

return Ok(());
}
}
else {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auth_state.unwrap would allow a temporary database failure to cause a panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants