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

Proposals fields has no limitation for size. #268

Open
cryply opened this issue Jan 6, 2022 · 5 comments
Open

Proposals fields has no limitation for size. #268

cryply opened this issue Jan 6, 2022 · 5 comments
Labels
bug Something isn't working enhancement New feature or request Frontend validation

Comments

@cryply
Copy link

cryply commented Jan 6, 2022

Describe the bug
FE does not restrict from entering super long strings in Proposal

To Reproduce
Steps to reproduce the behavior:

  1. Go to DAO you belongs
  2. Click on Create Proposal
  3. Fill up many Proposal Title and Proposal Content Description with long string
  4. Click on Publish Proposal
  5. See that FE take long time due to fact that its actually sending this Loremipsum to BE.

Expected behavior
Length of Title and Description must be limited.

Screenshots
image

Additional context
I was also not authorize to Publish is it due to fact that DAO not mine? But I guess any member of DAO can make proposal...

@DarkNebula0
Copy link
Member

@2075 Here come up 2 new questions :)

  1. What is the maximum length of the text
  2. When is a member allowed to create a proposal or what kind of restriction is there?

@DarkNebula0 DarkNebula0 added bug Something isn't working enhancement New feature or request Frontend labels Jan 6, 2022
@soundyogi
Copy link
Collaborator

soundyogi commented Jan 6, 2022

I think 48bytes.
if(new Blob([values.title]).size > 48) errors.title = 'Please enter a maximum of 48 bytes.'
I used this one in Campaigns ^

(I hope I have validation done for proposals soon working again)

@cryply
Copy link
Author

cryply commented Jan 7, 2022

utf-8 can be up to 4 bytes per character

@2075
Copy link
Member

2075 commented Jan 7, 2022

yeah, the field validations should possibly come from a lib providing this, internationalisation?

@2075
Copy link
Member

2075 commented Jan 7, 2022

@DarkNebula0

  • max length should be a sane number
  • a member of a dao can always create proposals
  • a member of a campaign can also vote on withdrawal votings
  • a controller of a dao can create withdrawal votings

all up for discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Frontend validation
Projects
None yet
Development

No branches or pull requests

5 participants