Skip to content

Conversation

@anandnikhil45
Copy link

@anandnikhil45 anandnikhil45 commented Dec 23, 2025

This PR adds a character limit to the legal form details field to prevent excessively large submissions and reduce potential abuse.

Fixes #10105

@anandnikhil45 anandnikhil45 requested a review from a team as a code owner December 23, 2025 11:44
@stevejalim
Copy link
Contributor

Hi @anandnikhil45 - thanks for this. In the comments on the issue I think Daniel suggested 5000 chars as a good balance between too long and too short. Could you update your changes to match, please?

It would also be nice to add help text on the field to mention this limit, if you don't mind.

Thanks
Steve

@anandnikhil45
Copy link
Author

I’ve updated the input_details field to use a 5000 character limit and added help text to document the limit, following the suggestion in the comments.

Please let me know if any further changes are needed. Thanks!

@stevejalim
Copy link
Contributor

stevejalim commented Jan 6, 2026

@anandnikhil45 Thanks for this. Looking at how we do help text for https://www.mozilla.org/en-US/about/legal/defend-mozilla-trademarks/, I can see we actually put it in the HTML not on the form. Would you mind making this change to make it consistent?

Here's the current markup for that page and the help text would go in on line 156 I think: https://github.com/mozilla/bedrock/blob/main/bedrock/legal/templates/legal/fraud-report.html#L119-L183

@stevejalim
Copy link
Contributor

@anandnikhil45 To make the pre-commit and linting checks work, our docs mention how to install pre-commit here https://mozmeao.github.io/platform-docs/getting-started/install/?h=pre+commit#pre-commit-hooks

Once installed you can automatically fix up most linting issues with ruff check . --fix

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.

Set a char limit on legal form fields, to handle abuse

2 participants