-
Notifications
You must be signed in to change notification settings - Fork 261
fix: dashboard patch api should not allow 'id' in updates #909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: dashboard patch api should not allow 'id' in updates #909
Conversation
|
@mGolestan98 is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
actually 2 things that i just realized:
I'm converting this PR to a draft for now. |
I think the problem is that zod is allowing undefined fields by default. Appending
Response after editing dashboard title:
|
Thanks @dhable. I think using Instead, I’d suggest stripping unknown parameters in all backend API routes using the Also, since |
Problem
The dashboard PATCH API endpoint was using
DashboardSchema.partial()
for request body validation, which allowed theid
field to be included in update requests. This was inconsistent with theupdateDashboard
controller method, which was already correctly typed to accept schema excluding the id.