-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
fix: maintainance able to handle dateRange
being invalid
#5701
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: master
Are you sure you want to change the base?
Conversation
Added additional check in the model of maintenance.js to avoid an exception when recieving a payload without a date range.
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.
Description
No issue created beforehand
Could you please explain what bug this fixes?
How did you experience it, what are the consequences.
Currently, this looks quite like the usual AI-Spam/Slop we get a lot..
Hello, I installed autokuma which also has the "kuma-cli" project. I was interested in using it to activate and de-activate maintenances in an automatic maner when the server backs up the docker containers, for which the containers need to be stopped. To do so, i created a script that will automatically calls the kuma-cli command Since the maintenance subcommand is not extensively documented i had to debug for a while before realising that currently, the socket event that parses the maintenance creation information uses the function The proposed fix just does that: it checks if the |
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.
Fair enough.
So basically, we are skipping input verification on this parameter.
please move this to the input varification for the maintainance or default bean.start_date = null
for invalid input.
dateRange
being invalid
Added additional check in the model of maintenance.js to avoid an exception when recieving a payload without a date range.
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
No issue created beforehand
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.