redash
redash copied to clipboard
Fix query create update json sanitize
trafficstars
What type of PR is this?
- [ ] Refactor
- [ ] Feature
- [x] 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?
- [x] Unit tests (pytest, jest)
- [ ] E2E Tests (Cypress)
- [ ] Manually
- [ ] N/A