Skip to content

Add extra validation for user-submitted data#66

Merged
Fleeym merged 5 commits intomainfrom
more-validation
Apr 11, 2026
Merged

Add extra validation for user-submitted data#66
Fleeym merged 5 commits intomainfrom
more-validation

Conversation

@dankmeme01
Copy link
Copy Markdown
Member

@dankmeme01 dankmeme01 commented Apr 6, 2026

  • Avoid unzipping zip bombs (skip processing entirely if total uncompressed size >= 512mb)
  • Cap sizes of mod.json and markdown files
  • Validate that mod name consists of only printable characters
  • Put reasonable length limits on a bunch of strings
  • Add length limit to dev display names

Copy link
Copy Markdown
Collaborator

@Fleeym Fleeym left a comment

Choose a reason for hiding this comment

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

Hi, just a few nitpicks for this.

@dankmeme01
Copy link
Copy Markdown
Member Author

Implemented better errors for client, for example:

  • ID too long: Invalid mod.json: validation error: field 'id' is invalid: length must be at most 64 characters
  • Name too long: Invalid mod.json: validation error: field 'name' is invalid: length must be at most 256 characters
  • Tags too long: Invalid mod.json: validation error: field 'tags' is invalid: String is too long (max 256 characters)

@Fleeym Fleeym merged commit 632b77c into main Apr 11, 2026
2 checks passed
@Fleeym Fleeym deleted the more-validation branch April 11, 2026 09:27
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