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

Keys are declared as var and exposed #1261

Closed
mossid opened this issue Jun 15, 2018 · 12 comments
Closed

Keys are declared as var and exposed #1261

mossid opened this issue Jun 15, 2018 · 12 comments

Comments

@mossid
Copy link
Contributor

mossid commented Jun 15, 2018

https://github.com/cosmos/cosmos-sdk/blob/develop/x/stake/keeper_keys.go#L15

Other code can modify this values to cause unexpected behavior

@cwgoes
Copy link
Contributor

cwgoes commented Jun 15, 2018

cc @rigelrozanski

@rigelrozanski
Copy link
Contributor

Yeah need to be constants and modified to a different type

@ValarDragon
Copy link
Contributor

Closes by #1119

@ValarDragon
Copy link
Contributor

ValarDragon commented Jun 27, 2018

My bad, I misread what this issue was for. Relevant keys have been moved to /x/stake/stake.go

@ValarDragon ValarDragon reopened this Jun 27, 2018
@ValarDragon ValarDragon mentioned this issue Jul 19, 2018
22 tasks
@ValarDragon ValarDragon added API and removed prelaunch labels Sep 15, 2018
@jackzampolin
Copy link
Member

jackzampolin commented Oct 12, 2018

Pretty sure this has been addressed. Going to close this issue. Please reopen and send any 🔥 -> @jackzampolin

@ValarDragon
Copy link
Contributor

@jackzampolin
Copy link
Member

Pretty sure this has been addressed. Going to go ahead and close. Please reopen if I'm wrong.

@cwgoes
Copy link
Contributor

cwgoes commented May 28, 2019

@cwgoes cwgoes reopened this May 28, 2019
@jackzampolin
Copy link
Member

We should expose some of these for querying from the store.

@cwgoes
Copy link
Contributor

cwgoes commented May 28, 2019

(I'm not sure if this is a serious security concern, but the original state of affairs has not changed)

@alexanderbez
Copy link
Contributor

alexanderbez commented May 28, 2019

Indeed, string constants should remain exported (eg. for use in queriers). Any keys used for persistent in stores should be constants and private if possible.

@jackzampolin
Copy link
Member

Closing this issue as addressed.

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

No branches or pull requests

6 participants