Skip to content

security: enforce stricter input validation for #830#859

Open
basantnema31 wants to merge 1 commit into
SdSarthak:mainfrom
basantnema31:fix-issue-830
Open

security: enforce stricter input validation for #830#859
basantnema31 wants to merge 1 commit into
SdSarthak:mainfrom
basantnema31:fix-issue-830

Conversation

@basantnema31
Copy link
Copy Markdown

Resolves #830.

Copy link
Copy Markdown
Owner

@SdSarthak SdSarthak left a comment

Choose a reason for hiding this comment

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

The sanitizeInput utility is a one-liner regex that strips HTML tags but it's not wired to anything in the codebase — no forms, inputs, or API boundaries use it.

If this is meant to prevent XSS, the right approach is to use DOMPurify for sanitizing HTML content in the DocumentEditor preview (which renders raw markdown/HTML), not a regex on all inputs. Regex-based HTML stripping is not safe against all XSS vectors.

Please either:

  1. Wire the validation to the components that actually need it (e.g., the document preview) with a proper sanitization library, or
  2. Describe what specific vulnerability this fixes and where it's applied.

@SdSarthak SdSarthak added gssoc:approved GSSoC approved contribution — required for points to count level:beginner Beginner difficulty task type:security Security related labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC approved contribution — required for points to count level:beginner Beginner difficulty task type:security Security related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security] Enforce Stricter Input Validation and Prevent Injection Vulnerabilities

2 participants