Commit graph

618 commits

Author SHA1 Message Date
Pēteris Caune
1da1a02be4
Add "The following checks are also down: ..." in Signal notifications 2021-12-10 11:30:48 +02:00
Pēteris Caune
307dfbb99e
Add "The following checks are also down: ..." in Telegram notifications 2021-12-08 16:06:08 +02:00
Pēteris Caune
c7c48477df
Fix report templates to not show the "started" status 2021-12-08 09:41:49 +02:00
Pēteris Caune
7fb64c8249
Implement Pushover emergency alert cancellation when check goes up 2021-11-21 13:15:35 +02:00
Pēteris Caune
8d9a6866a4
Update CHANGELOG for the v1.24.1 release 2021-11-10 13:51:29 +02:00
Pēteris Caune
a0d3d40033
Update CHANGELOG for the v1.24.0 release 2021-11-10 12:29:47 +02:00
Pēteris Caune
9e36eb5fcc
Remove the "welcome" landing page
Redirect unauthenticated users to the sign in page
instead. Rationale:

- The content on the welcome page is what often belongs
  to a separate "marketing site". The marketing content
  is of no use on self-hosted instances, which typically
  have new signups disabled and are for internal use only
- (the real reason, let's be honest) a number of
  self-hosted instances are accessible over the public
  internet. Search engines index the nearly identical
  landing pages and see them as duplicated content.
2021-11-10 11:59:55 +02:00
Pēteris Caune
1299738f50
Add SIGTERM handling in sendreports 2021-11-07 11:05:10 +02:00
Pēteris Caune
bc2d127c27
Add SIGTERM handling in sendalerts 2021-11-06 19:54:41 +02:00
Pēteris Caune
e0d2f36928
Improve period and grace controls, allow up to 365 day periods
Fixes: #281
2021-11-04 15:44:51 +02:00
Pēteris Caune
b77c54f665
Update Dockerfile to install apprise
Fixes: #581
2021-10-25 21:55:11 +03:00
Pēteris Caune
e1f51093f1
Implement automatic api_ping and api_notification pruning
cc: #556
2021-10-21 14:35:02 +03:00
Pēteris Caune
ba3f222f37
Fix a crash in hc.api.views.pause with an int in request body
The jsonify decorator parses request payload as JSON
and puts it in request.json. The payload would normally
be a complex object, but if a client sends, let's say,
a single integer, then request.json is a python int.

The authorize decorator looks for API key first in request
headers, then in request body. It expects the request
body to be a complex object.

This commit changes adds the following validation rule in
the jsonify decorator: if request body is not empty, it
*must* parse as JSON, and the root element of the parsed
document *must* be a dict.
2021-10-20 23:06:21 +03:00
Pēteris Caune
829a39f4cf
Fix hc.api.views.ping to handle non-utf8 data in request body
Fixes: #574
2021-10-19 19:19:46 +03:00
Pēteris Caune
6158f9c539
Change outgoing webhook timeout to 10s, and change the retry logic
Previous retry logic was:
- max 3 tries
- every try times out after 5 seconds

The new retry logic is:
- max 3 tries
- every try times out after 10 seconds
- if the first two tries have used > 10 seconds, don't
  do the third try

cc: #569
2021-10-14 16:22:14 +03:00
Pēteris Caune
141d71d9fe
Switch from croniter to cronsim (vendored in hc.lib.cronsim) 2021-10-14 12:42:31 +03:00
Pēteris Caune
0056cbf058
Fix release dates in CHANGELOG 2021-10-13 12:27:23 +03:00
Pēteris Caune
30a3482d0e
Fix missing uwsgi dependencies in arm/v7 Docker image 2021-10-13 10:43:04 +03:00
Pēteris Caune
3e0ff1cf81
Update CHANGELOG for v1.23.0 release 2021-10-13 09:35:00 +03:00
Pēteris Caune
5656515830
Add 'schemaVersion' field in the shields.io endpoint
Fixes: #566
2021-10-02 13:38:45 +03:00
Pēteris Caune
5fe4a60b30
Upgrade to jQuery 3.6.0 2021-10-01 13:12:20 +03:00
Pēteris Caune
148894bd9e
Upgrade to Bootstrap 3.4.1 2021-10-01 12:21:54 +03:00
Pēteris Caune
27da637e86
Fix Dockerfile to correctly build cryptography==35.0.0 on 32-bit arm
Fixes: #565

Also, split Dockerfile into two stages, so rust
and other build dependencies don't end up in the final image.

Note cryptography has binary wheels for various architectures,
but unfortunately not for 32-bit arm. And, starting from v35.0.0,
cryptography requires rust to build from source.
2021-10-01 09:53:48 +03:00
Pēteris Caune
6e3a1c790d
Fix the ping handler to reject status codes > 255 2021-09-15 11:36:15 +03:00
Pēteris Caune
f8131741ef
Fix minor API inconsistencies
1. Drop API support for GET, DELETE requests with a request body.
Healthchecks had an undocumented quirk where you could authenticate a
GET or DELETE request by putting a '{"api_key":"..."}' in request body.
This commit removes this feature.

Note: POST requests can still authenticate either by sending
a X-Api-Key header, or by putting a "api_key" key in request body.
GET and DELETE requests can now only authenticate with the
request header.

2. Add missing @csrf_exempt annotations in API views
When client sends a HTTP POST request to a GET-only endpoint,
the server is supposed to respond with "405 Method Not Allowed".
Due to CSRF checking, a couple endpoints were responding with
"403 Forbidden" instead. Adding @csrf_exempt annotations fixes
the problem.
2021-09-10 22:49:12 +03:00
Pēteris Caune
3dfdbc09ca
Add ability to create/revoke individual keys 2021-09-09 14:55:17 +03:00
Pēteris Caune
8541ec59ca
Add ability to edit existing WhatsApp integrations 2021-08-26 10:17:01 +03:00
Pēteris Caune
5af09ed4dd
Add ability to edit existing Signal integrations 2021-08-26 10:01:09 +03:00
Pēteris Caune
3807c200ce
Add ability to edit existing SMS integrations 2021-08-26 09:42:35 +03:00
Pēteris Caune
2a9a544ddf
Add ability to edit existing email integrations 2021-08-25 18:04:54 +03:00
Pēteris Caune
98eb7cc14a
Add /api/v1/badges/ endpoint
cc: #552
2021-08-18 17:47:57 +03:00
Pēteris Caune
1247cc4ea7
Fix a crash during login when user's profile does not exist
Fixes: #77
2021-08-18 10:32:10 +03:00
Pēteris Caune
b43612806f
Fix dark mode bug in selectpicker widgets 2021-08-10 16:47:47 +03:00
Pēteris Caune
544ec7ea69
Add handling for non-latin-1 characters in webhook headers 2021-08-10 10:36:58 +03:00
Pēteris Caune
2a9bc42dd4
Update Changelog for v1.22.0 release 2021-08-06 14:27:15 +03:00
Pēteris Caune
7252f2f101
Fix _allow_redirect function to reject absolute URLs
This fixes a security issue:
- attacker can crafts a redirect URL to an external site
- attacker gets victim to click on it
- victim logs in
- after login, Healthchecks redirects victim to the external site

The _allow_redirect function now additionally
requires the redirect URL is relative (has no scheme or domain).
2021-08-06 13:34:40 +03:00
Pēteris Caune
e6427995b7
Add Whitenoise and improve README
Fixes: #548
2021-08-05 18:06:47 +03:00
Pēteris Caune
222722569e
Add support for 2FA using TOTP
Fixes: #354
2021-07-30 16:43:23 +03:00
Pēteris Caune
4f83f8c06b
Fix a 403 when transferring a project to a read-only team member 2021-07-26 12:50:43 +03:00
Pēteris Caune
e46000ecdf
Add admin action to log in as any user 2021-07-20 11:16:12 +03:00
Pēteris Caune
2382bf6722
Add SITE_LOGO_URL setting
Fixes: #323
2021-07-16 15:30:34 +03:00
Pēteris Caune
dd88924660
Fix dark mode styling issues in Cron Syntax Cheatsheet 2021-07-16 12:25:16 +03:00
Pēteris Caune
99bb71c920
Use multicolor channel icons for better appearance in the dark mode 2021-07-07 15:23:02 +03:00
Pēteris Caune
5a4c06ffae
Update CHANGELOG for v1.21.0 release 2021-07-02 16:52:24 +03:00
Pēteris Caune
d243f502d3
Fix off-by-one-month error in monthly reports, downtime columns
Fixes: #539
2021-07-02 15:22:51 +03:00
Pēteris Caune
2d20f439dd
Remove PagerDuty Connect
PagerDuty Connect is deprecated and will be discontinued.
It is replaced by PagerDuty Simple Install Flow (see
README for setup instructions).
2021-06-21 10:44:21 +03:00
Pēteris Caune
c5229d6505
Add CSS for dark mode 2021-06-16 15:23:34 +03:00
Pēteris Caune
fd7ab5e767
Implement PagerDuty Simple Install Flow 2021-06-16 14:18:32 +03:00
Pēteris Caune
df44ee58c0
Add an option for weekly reports (in addition to monthly) 2021-05-24 13:44:34 +03:00
Pēteris Caune
855d188981
Add support for "... is UP" SMS notifications
Fixes: #512
2021-05-21 12:57:23 +03:00