Skip to content

Conversation

@rymut
Copy link

@rymut rymut commented May 25, 2025

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

The query def post(self) methods did not sanitize input correctly, any user with modify access can update query owner when user_id is set (bug present during update/create) also updated_at might be not updated when skip_updated_at is present and set to True. During update when is_archived is set to True, created query is both a draft and archived at the same time.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

rymut added 4 commits May 24, 2025 09:59
During query update/create input json is not sanitized correctly.

Two glaring issues are:

1. During update when `user_id` field is present in request
have ability to reasign query to other user.
2. During create when `is_archived` field is present in request
created query is both draft & archived at the same time.

This commit resolves the issue with the use of projection.
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.

1 participant