Commit graph

622 commits

Author SHA1 Message Date
Pēteris Caune
9e578f6dfc
Add "Disabled" priority for Pushover notifications
Fixes: #663
2022-06-10 18:19:12 +03:00
Pēteris Caune
51f7fe7332
Expose subject and subject_fail in API GET calls, improve docs 2022-06-03 09:59:20 +03:00
Pēteris Caune
b19ddab1bd
Add Gotify integration
Fixes: #270
2022-06-01 16:13:41 +03:00
Pēteris Caune
c1ff8875e3
Implement login link expiration
Login links will now expire in 1 hour.
2022-05-30 15:48:51 +03:00
Pēteris Caune
1d340d24aa
Add notes in docs about configuring uWSGI via UWSGI_ env vars
cc: #656
2022-05-27 15:13:03 +03:00
Pēteris Caune
a5e5b45983
Reduce logging, add Ctrl+C handler in sendalerts and sendreports
cc: #656
2022-05-27 14:49:44 +03:00
Pēteris Caune
6790d867a6
Add address verification step in the "Change Email" flow
A similar issue has come up multiple times: the user
changes account's email address, enters a bad address
by mistake, and gets locked out of their account.

This commit adds an extra step in the "Change Email" flow:

* In "Account Settings", user clicks on [Change Email]
* User gets a prompt for a 6-digit confirmation code, which
  has been sent to their old address. This is to prevent
  account takeover when Eve sits down at a computer where Alice
  is logged in.
* The user enters the confirmation code, and a "Change Email"
  form loads.
* The user enters their new email address.
* (The new step!) Instead of changing the email right away,
  we send a special login link to user's specified new address.
* (The new step, continued) The user clicks on the login link,
  their account's email address gets updated, and they get
  logged in.

The additional step makes sure the user can receive email
at their new address. If they cannot receive email there,
they cannot complete the "Change Email" procedure.
2022-05-20 17:54:45 +03:00
Pēteris Caune
7247983fdd
Add logic to handle ContentDecodingError exceptions 2022-05-17 16:16:24 +03:00
Pēteris Caune
fb0e3bc10d
Update hc.front.views.channels to handle empty strings in settings
Fixes: #635
2022-05-16 15:10:26 +03:00
Pēteris Caune
e3ff8bf3ca
Update CHANGELOG for v2.1 release 2022-05-10 16:32:03 +03:00
Pēteris Caune
e7076155e7
Add "Ping-Body-Limit" response header in ping API responses
The header format is:

    Ping-Body-Limit: n

Where "n" is an integer number, the value of the  PING_BODY_LIMIT
configuration setting.

Clients can use this header to decide how much POST data to send
in HTTP requests. If a client sends more than "n" bytes in the
request body, Healthchecks will store the first "n" bytes, and
ignore the rest.

The default value for PING_BODY_LIMIT is 10000 (10KB).
2022-05-10 15:44:27 +03:00
Pēteris Caune
f8382fd84e
Increase max displayed duration from 24h to 72h
Fixes: #644
2022-05-02 12:07:14 +03:00
Pēteris Caune
d1d9dd5021
Fix "Test" button for integrations that only send "up" notifications 2022-05-02 11:55:00 +03:00
Pēteris Caune
0bd09a6e65
Update the C# snippet 2022-04-25 20:55:16 +03:00
Pēteris Caune
156fc321bc
Upgrade to django-compressor 4.0
Fixes: #615
2022-04-23 18:12:20 +03:00
Pēteris Caune
b776762ba9
Fix prunenotifications to handle checks with missing pings
Fixes: #636
2022-04-20 16:25:19 +03:00
Pēteris Caune
aa2571b7fc
Add small delay in transports.Email.notify to allow ping body to upload 2022-04-19 11:37:48 +03:00
Pēteris Caune
32f021b9c5
Update email template to handle not yet uploaded ping bodies 2022-04-13 10:43:12 +03:00
Pēteris Caune
bb38ad3187
Remove the Signal CAPTCHA form (use "submitchallenge" command instead) 2022-04-11 14:24:28 +03:00
Pēteris Caune
7bd916558b
Add @login_required and update CHANGELOG 2022-04-09 16:35:57 +03:00
Pēteris Caune
c5e677681b
Add test for hc_check_up and update CHANGELOG 2022-04-08 11:47:50 +03:00
Pēteris Caune
a3d1bc7386
Implement the "started" progress spinner in the details pages 2022-04-08 10:56:36 +03:00
Pēteris Caune
911d63a2eb
Add logic to alert ADMINS when Signal transport hits a CAPTCHA challenge 2022-04-07 09:31:20 +03:00
Pēteris Caune
c4bbb4432a
Fix unwanted localization in badge SVG generation
Fixes: #629
2022-04-01 15:58:17 +03:00
Pēteris Caune
d54dcb5ea6
Fix the GHA workflow for building arm/v7 docker image 2022-03-18 13:24:18 +02:00
Pēteris Caune
e2a8e712c4
Update CHANGELOG for v2.0 release 2022-03-18 09:05:55 +02:00
Pēteris Caune
6958a9e898
Add a "Download Original" link in the "Ping Details" dialog 2022-03-16 17:31:01 +02:00
Pēteris Caune
fcaf894d46
Fix Mattermost integration to treat 404 as a transient error
Fixes: #613
2022-03-09 10:10:38 +02:00
Pēteris Caune
16a2cd204e
Fix unwanted localization of period and grace values
cc: #617
2022-03-09 09:13:09 +02:00
Pēteris Caune
05bb80130b
Add support for storing ping bodies in S3-compatible object storage
This is an initial, minimal implementation. It is currently
missing: error handling, timeouts for S3 operations, documentation.

cc: #609
2022-02-28 11:51:04 +02:00
Pēteris Caune
5ecd625c0b
Add Ping.body_raw field for storing body as bytes 2022-02-25 16:50:54 +02:00
Pēteris Caune
3b56fd4175
Fix Signal integration to handle UNREGISTERED_FAILURE errors 2022-02-23 11:32:17 +02:00
Pēteris Caune
8dcc1bfdc1
Fix Telegram bot to handle TransportError exceptions
The Telegram onboarding flow in a nutshell:

1. user invites our bot in a channel and types "/start"
2. Telegram calls our webhook (/integration/telegram/bot/)
3. Our webhook generates and posts an invite link to the chat
4. User clicks the invite link, we show "Add Telegram" form
...

In step 3, when we post the invitation link, if Telegram returns
an error (for example, CHAT_WRITE_FORBIDDEN), our webhook was
throwing HTTP 500. In response, Telegram would retry the webhook
several times, but that's probably futile.

After this commit, the webhook will return HTTP 200, regardless
of whether we could post the invite to the Telegram chat or not.
2022-02-16 16:12:54 +02:00
Pēteris Caune
3f521b16f7
Make email non-editable in "Invite Member" when team limit reached
There is a specific limit of how many other users a given user
can invite in their projects (depends on the plan they are on).
When the limit is reached, the user cannot invite *new* users
in their projects, but they can still invite team members
from one project into another project. In other words, we count
the number of unique invited users, not the number of memberships.

There was an UI bug in the "Invite a Team Member" dialog. The
dialog has an editable "Email" text field. When an user has reached
the team limit, and they open the "Invite" dialog, they could
enter a new user's email address in the Email field and try to invite
them. The server would refuse to exceed the team limit and would
return a plain HTTP 403 page. This is of course confusing to the 
end user.

The fix is to show "Email" as a text field only if the user has
not yet exceeded their team size. If they have, then show "Email"
as non-editable text.
2022-02-04 20:43:17 +02:00
Pēteris Caune
5ae85f850c
Fix JS error after copying a code snippet 2022-02-04 17:05:45 +02:00
Pēteris Caune
6539173a0f
Fix special character escaping in LINE Notify notifications 2022-02-04 15:16:56 +02:00
Pēteris Caune
d5103a8231
Disable special character escaping in Pushbullet notifications 2022-02-04 15:02:15 +02:00
Pēteris Caune
d38ebee06c
Disable HTML escaping in Spike.sh notifications 2022-02-04 14:27:02 +02:00
Pēteris Caune
b56f27e4e2
Improve PagerDuty notifications
- Include additional data in the "details" key
- Don't escape HTML characters in the "description" field

cc: #600
2022-02-04 10:36:33 +02:00
Pēteris Caune
14e77f0acc
Disable HTML escaping in Pushover notification titles
Fixes: #606
2022-02-04 10:04:07 +02:00
Pēteris Caune
e5ac8d7dbc
Update the "Add TOTP" form to display plaintext TOTP secret
Fixes: #602
2022-01-24 15:17:48 +02:00
Pēteris Caune
82663a2a52
Update Signal integration to use JSON RPC over UNIX socket 2022-01-13 18:12:33 +02:00
Pēteris Caune
24a36beb77
Update email bounce handler to mark email channels as disabled
User can re-enable a disabled email channel by editing it
(in the Integrations page, click the "Fix..." button).

Fixes: #446
2022-01-13 12:10:08 +02:00
Pēteris Caune
39db47387f
Update Telegram to treat "group chat was deleted" as permanent error 2022-01-07 16:16:24 +02:00
Pēteris Caune
731c54529c
Update CHANGELOG for v1.25.0 release 2022-01-07 12:17:22 +02:00
Pēteris Caune
d615cde23e
Update Dockerfile to avoid running "pip wheel" more than once
The problem:
- the first "pip wheel" collects a specific version of requests
- the second "pip wheel" collects the latest version of requests
- later "pip install" tries to install both and fails

The fix is to run "pip wheel" once, and it will then pick a single
version of requests that satisfies all constraints.

Fixes: #594
2022-01-05 21:35:09 +02:00
Pēteris Caune
6805d75a29
Bump the min. Python version to 3.8 (as required by Django 4) 2022-01-05 16:13:49 +02:00
Pēteris Caune
a155f40861
Upgrade to Django 4
Replace usages of pytz with zoneinfo, upgrade to cronsim==2.0,
which is compatible with zoneinfo.
2022-01-05 16:01:48 +02:00
Pēteris Caune
d15ea01077
Bump the minimal Python version from 3.6 (EOL) to 3.7 2022-01-05 14:25:07 +02:00
Pēteris Caune
7317adc7f7
Refactor transport classes, add Channel.disabled field
- Refactor transport classes to raise exceptions
  on delivery problems, instead of returning error
  message as string. Exceptions can carry extra meta
  information (see TransportError.permanent field, see
  MigrationRequiredError subclass). I considered attaching
  the extra information to strings by subclassing str, but
  using exceptions felt cleaner and less hacky.

- Add Channel.disabled field, for disabling integrations
  on permanent errors. For example, if Slack returns
  HTTP 404, we will now mark the integration as disabled
  and will not make requests to that Slack endpoint again.
2022-01-05 09:46:39 +02:00