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

libkb: optimization: only load necessary fields from user/lookup #1473

Merged
merged 2 commits into from
Dec 4, 2015

Conversation

maxtaco
Copy link
Contributor

@maxtaco maxtaco commented Dec 4, 2015

  • strip out some dead code too

@maxtaco
Copy link
Contributor Author

maxtaco commented Dec 4, 2015

PTAL @patrickxb ?

- use the sigchain and not the merkle leaf, for figuring out the chain tail
@maxtaco
Copy link
Contributor Author

maxtaco commented Dec 4, 2015

It turns out there is also a security flaw here. The user shouldn't trust the server's output for sigs, which isn't trusted. This PR fixes that.

@@ -137,7 +137,15 @@ func (u *User) ToTrackingStatementBasics(errp *error) *jsonw.Wrapper {
}

func (u *User) ToTrackingStatementSeqTail() *jsonw.Wrapper {
return u.sigs.AtKey("last")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this isn't a good idea, since this dictionary arrives from the server, untrusted.

@patrickxb
Copy link
Contributor

LGTM

maxtaco added a commit that referenced this pull request Dec 4, 2015
libkb: optimization: only load necessary fields from user/lookup
@maxtaco maxtaco merged commit e13dc54 into master Dec 4, 2015
@maxtaco maxtaco deleted the maxtaco/user-load-optimizations branch December 4, 2015 16:21
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