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

comments: Update signature and settings. #1483

Closed
lukebp opened this issue Aug 8, 2021 · 0 comments · Fixed by #1487
Closed

comments: Update signature and settings. #1483

lukebp opened this issue Aug 8, 2021 · 0 comments · Fixed by #1487
Assignees
Labels
enhancement The issue enhances an existing feature.

Comments

@lukebp
Copy link
Member

lukebp commented Aug 8, 2021

Update signature

The comment signature needs to include the ExtraData and ExtraDataHint fields.

The New and Edit commands of both the politeiawww and plugin APIs need to be updated to reflect this change.

This is also a good time to make the same documentation improvements that we've been making in other areas. The existing documentation looks something like this:

// Signature is the client signature of the:
// State + Token + ParentID + Comment

Let's make it more detailed. Example:

// Comment represent a record comment.
//
// PublicKey is the user's public key that is used to verify the signature.
//
// Signature is the user signature of the:
// State + Token + ParentID + Comment + ExtraData + ExtraDataHint
//
// Receipt is the server signature of the user signature.
//
// The PublicKey, Signature, and Receipt are all hex encoded and use the
// ed25519 signature scheme.
...

Update plugin setting

An AllowExtraData plugin setting needs to be added to the comments plugin that defaults to false. We don't want users to be able to submit arbitrary data in the ExtraData and ExtraDataHint fields. The purpose of these fields is to allow application specific functionality to be layered on top of the comments plugin. An application should add in validation for these fields if it enables this setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue enhances an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants