Commit graph

3197 commits

Author SHA1 Message Date
Pēteris Caune
2105347897
Bump Django and whitenoise versions 2022-06-13 12:56:34 +03:00
Pēteris Caune
9e578f6dfc
Add "Disabled" priority for Pushover notifications
Fixes: #663
2022-06-10 18:19:12 +03:00
Pēteris Caune
ca392c07ce
Eliminate jQuery usage in the login page 2022-06-08 09:46:51 +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
6a68fd2c23
Add subject and subject_fail type and length validation 2022-06-03 09:18:22 +03:00
Tyler
d61909ffd2 Expose subject and subject_fail via API 2022-06-03 09:12:46 +03:00
Pēteris Caune
a37a937209
Improve Gotify instructions and event description 2022-06-01 16:37:54 +03:00
Pēteris Caune
b19ddab1bd
Add Gotify integration
Fixes: #270
2022-06-01 16:13:41 +03:00
Pēteris Caune
03dea07ae2
Remove obsolete field: Check.last_ping_was_fail 2022-05-31 15:13:00 +03:00
Pēteris Caune
8216377da6
Improve tests 2022-05-30 17:33:10 +03:00
Pēteris Caune
f7b4a6d71c
Remove support for unsigned login tokens 2022-05-30 16:59:13 +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
66b7f4dd32
Fix upload test to specify its own PING_BODY_LIMIT 2022-05-30 14:42:23 +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
901f944055
Test pyflakes warnings 2022-05-26 21:39:53 +03:00
Pēteris Caune
09a99d3e9c
Add tests 2022-05-20 18:14:43 +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
8da87cdea5
Update code to not use related managers of unsaved objects
When testing with django==4.1a1, some tests were failing with
a message:

> ValueError: 'Check' instance needs to have a primary key
> value before this relationship can be used.

This commit fixes these failures, but there might be more
places to fix, that are not covered by tests yet.
2022-05-18 13:07:50 +03:00
Pēteris Caune
59e112852b
Switch from auto_now_add=True to default=now
I've run in the following problem a few times in tests:

* I create a model instance
* set its "created" field to a specific value
* I save the model instance
* I write testcase logic which relies on that specific "created" value

The testcase fails, because, with auto_now_add=True, Django
overwrites the created field. I can work around this by:

* Create and save a model instance
* Save it
* Set the created field to my desired value
* Save it again

But this is annoying to do, and annoying to troubleshoot
– it's easy to forget about the auto_now_add behaviour.

So I'm replacing auto_now_add=True with
default=django.utils.timezone.now.
2022-05-18 11:42:56 +03:00
Pēteris Caune
7247983fdd
Add logic to handle ContentDecodingError exceptions 2022-05-17 16:16:24 +03:00
Pēteris Caune
1a41e4e199
Enable error emails from management commands 2022-05-17 10:29:13 +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
0178cee02c
Update docker docs 2022-05-16 15:01:44 +03:00
Pēteris Caune
7889fa3d64
Remove obsolete key 2022-05-16 14:59:56 +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
eac023caa1
Enable searching channels by code in admin UI 2022-05-10 15:36:49 +03:00
Pēteris Caune
7a5b6b6b31
Fix tests 2022-05-07 20:56:39 +03:00
Pēteris Caune
62c631a1e8
Increase the default profile limits
Accounts on self-hosted instances should have "unlimited" limits.
I had originally assumed 500 checks should be *enough for everybody*,
but in practice people do have accounts with 1000+ checks,
and may want to do scale testing with even more checks
(see #649). This commit raises the "unlimited" limits higher
to make it less likely users bump into them.
2022-05-07 20:51:07 +03:00
Pēteris Caune
756257a4a4
Document webhook retry policy in the "Add Webhook" page 2022-05-02 14:54:02 +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
y8l
3b358cf6bf Closing #645
Fixing the URL path to Cron dialog screenshot in static/img with 2x zoom
2022-05-01 09:21:07 +03:00
Pēteris Caune
bc0eb8dc7d
Upgrade to cronsim 2.1 2022-04-30 09:27:48 +03:00
Pēteris Caune
98f2536825
Oops, remove debug code 2022-04-25 21:14:35 +03:00
Pēteris Caune
b07f670b05
Regenerate snippet HTML using latest Pygments 2022-04-25 21:06:27 +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
85ae2ce724
Remove UTF8 mention in attaching_logs.md 2022-04-20 17:37:22 +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
51d1b88a75
Rename /docker/.env -> /docker/.env.example
This should help avoid merge conflicts when users fork the
repository and make changes to /docker/.env

cc: #638
2022-04-20 15:55:46 +03:00
Pēteris Caune
4c58c55741
Fix tests to skip time.sleep() 2022-04-19 11:39:28 +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
cc3e4d8ab3
Fix wording 2022-04-13 10:52:18 +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
a26ab36ddc
Upgrade to Django 4.0.4 2022-04-11 11:55:59 +03:00
Pēteris Caune
6124ad59cd
Improve CAPTCHA alert email 2022-04-11 09:38:30 +03:00
Pēteris Caune
d1033ba6b5
Fix CAPTCHA email alert 2022-04-11 09:34:58 +03:00