-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(rules): remove id key from uploaded rule #1211
Conversation
I think this should really be done on the server side also, and this is actually a broader change that affects more than just rule definitions. Here we have an example of a POST endpoint that expects a form submission (URL-encoded or multipart) for creating a custom target. There is no Here we have a problem. This is an equivalent endpoint that expects a JSON payload body. This means the client is free to submit a JSON that includes For user convenience I think it's OK and a good idea to drop However, we shouldn't rely on our UI being the only client, so the server does need to be more proactive about checking requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please double check if there are any other UI workflows that perform a JSON POST like this and might also need to have id
fields stripped off.
This should be the only user upload where stripping the id applies. |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes: cryostatio/cryostat#261