unbridled-41 opened a new issue, #5004:
URL: https://github.com/apache/rocketmq-dashboard/issues/5004
### Studio Version
branch: rocketmq-studio
git commit id: 1ef5d860799ac3fabfcdea942cc4dcc77ded7be6
### Runtime Environment
Service-level reproduction in the repository's test suite
(SettingsServiceTest, mocked repository); no browser, cluster or MySQL needed.
### Connected RocketMQ Cluster
Not applicable — the defect is in the settings save path, independent of any
RocketMQ cluster.
### Describe the Bug
`getGeneralSettings` redacts `dingtalkWebhook`/`smsWebhook` to the literal
`"******"` for non-admin sessions (`SettingsService.java:112-127` at 1ef5d860 —
the #2339/#2341 redaction). The write side was never taught about that marker:
- The console echoes every field it received:
`GeneralSettingsTab.buildPayload` (`GeneralSettingsTab.tsx:54/:58`) always
includes both webhooks, and every save re-reads the current — redacted — record
first (`loadFreshSettings` then `saveGeneralSettings(buildPayload({ ...base,
...patch }))` at `:104-144`). The notification form is even pre-filled with the
redacted value (`:83-88`).
- `saveGeneralSettings` (`SettingsService.java:130-166`) preserves a blank
`apiKey`/`dingtalkSigningSecret` but has no handling for the webhook marker, so
`"******"` reaches `settingsRepository.saveGeneralSettings` verbatim.
Consequence: any save from a non-admin session — including one that only
changes the session timeout — replaces both webhook URLs with six asterisks.
Every later DingTalk/SMS notification then fails against a URL that is
literally `******`; the save itself succeeds, so the writer sees no error.
### Steps to Reproduce
1. Store a real DingTalk webhook and an SMS webhook as an administrator.
2. Log in as a non-admin (the session that GETs redacted values).
3. Open `/settings`, change only the session timeout, save the Security card.
4. Read the stored settings back as an administrator: both webhooks are now
`"******"`.
### What Did You Expect to See?
The stored webhook values survive a save that echoed the redacted marker;
the marker means "unchanged", not a URL of six asterisks. (The #2336/#2339
redaction was merged in d584cadd but only covered the read side.)
### What Did You See Instead?
The redaction is not round-trip safe: the GET redacts, the client echoes,
the POST persists the marker.
### Additional Context
Administrator saves are unaffected (admins receive unredacted values, which
never equal the marker). A webhook genuinely retyped to a different URL must
keep replacing the stored value — the fix needs to guard that too.
Corresponding pull request: #5000.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]