RocketChat / RocketChat/Rocket.Chat

Incoming WebHook Integration: Save button only checks 'dirty' state, allowing invalid submissions

Open
#39,100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

The "Save" button in the Incoming Webhook administration page is enabled as soon as any field in the form is modified, even if mandatory fields like "Post to Channel" and "Post as" are left empty.

https://github.com/user-attachments/assets/3ae1970b-bfa3-443c-bae4-cc4838f043e3

Steps to reproduce:
  1. Navigate to Administration -> Integrations.
  2. Click on "New" then select "Incoming Webhook".
  3. Leave the required fields "Post to Channel" and "Post as" empty.
  4. Type any text into the optional "Name" field to trigger the form's "dirty" state.
  5. Observe that the "Save" button in the footer becomes enabled.
  6. Click "Save".
Expected behavior:

The "Save" button should remain disabled until all required fields satisfy the validation rules (i.e., they are not empty).

Actual behavior:

The "Save" button is enabled based solely on the form being modified, allowing the submission of incomplete data.

Server Setup Information:
  • Version of Rocket.Chat Server: 8.3.0-develop
  • Operating System: Fedora Workstation 41
  • Deployment Method: Local development
  • NodeJS Version: 22.16.0
Client Setup Information
  • Browser Version: Brave
  • Operating System: Fedora Workstation 41
Additional context

The Save button in the footer is currently programmed to become active as soon as any change is made to the form (the isDirty state).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Incoming Webhook administration page and trace how the form's dirty state and required-field validation control the Save button. Verify the behavior with empty "Post to Channel" and "Post as" fields while changing "Name"; done means Save stays disabled until the required fields are valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.