Skip to content

fix: reject invalid conversation parameters - #4

Open
evanmarshall wants to merge 11 commits into
developfrom
ito-mirror/upstream-15623
Open

evanmarshall wants to merge 11 commits into
developfrom
ito-mirror/upstream-15623

Conversation

@evanmarshall

Copy link
Copy Markdown

Mirror of chatwoot#15623 for Ito QA evaluation.

Upstream PR: chatwoot#15623
Upstream author: @sojan-official
Upstream head commit: 2f14c65856c1bf0fbe8e894dbd1d2e471404ad54


Conversation priority mutations and filters now reject malformed request values through Chatwoot's existing 422 Unprocessable Entity paths instead of allowing enum, bind, or database errors to reach Sentry.

Closes

How to reproduce

  • Send the unsupported priority: "none" value to a conversation priority endpoint. It previously reached the enum assignment and raised ArgumentError.
  • Submit a conversation filter whose values contains an object. It previously reached Active Record as a structured bind value and raised TypeError.

What changed

  • Route priority updates through the existing strong-parameter method and reject values outside the conversation priority enum.
  • Remove the unsupported none value from the public priority API schemas.
  • Reject structured filter values in the shared filter-condition validator while preserving scalar and scalar-array values.
  • Document the request-boundary validation rule in AGENTS.md.

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