Pēteris Caune
1247cc4ea7
Fix a crash during login when user's profile does not exist
Fixes : #77
3 years ago
Pēteris Caune
642d436ae9
Add absolute_site_logo_url template tag
This commit adds a {% absolute_site_logo_url %} template tag.
The tag emits an absolute url pointing to either
SITE_LOGO_URL or to the fallback picture.
The tag is used in base email template, in slack message
template, and in "Add MS Teams" page.
This commit also fixes a couple instances where absolute URLs
were constructed like so:
{% site_root %}/docs/
This would result in incorrect links if Healthchecks is not
running at webserver's root. The correct way is:
{% site_root %}{% url 'hc-docs' %}
Finally, this commit removes stuff/logo.svg and
stuff/logo-full.svg. Selfhosted sites should not use the
official Healthchecks.io logos, so no point keeping them around
there.
3 years ago
Pēteris Caune
484c0befbc
Fix email template to use SITE_LOGO_URL (with img/logo.png fallback)
Fixes : #550
3 years ago
Pēteris Caune
af7e8fc949
Fix the login view to handle already authenticated users
If an already authenticated user visits /accounts/login/,
Healthchecks will now redirect them to their dashboard
instead of showing the login form.
3 years ago
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).
3 years ago
Pēteris Caune
222722569e
Add support for 2FA using TOTP
Fixes : #354
3 years ago
Pēteris Caune
3cfc31610a
Add extra security checks in the login_webauthn view
4 years ago
Pēteris Caune
adb7702f39
Rename login_tfa to login_webauthn
4 years ago
Pēteris Caune
7639f0dd69
Add test cases for the login_tfa view
4 years ago
Pēteris Caune
155a1f132b
Simplify super() calls in tests
4 years ago
Pēteris Caune
acce0808ce
Project code in URL for the "Add Slack" page. cc: #336
5 years ago
Pēteris Caune
163b020116
Signup form sets the "auto-login" cookie to avoid an extra click during first login
5 years ago
Pēteris Caune
dfee69584b
Don't show the "Sign Up" link in the login page if registration is closed. Fixes #280
5 years ago
Pēteris Caune
cdfc9840a7
Source formatted with Black
6 years ago
Pēteris Caune
afaa8767cd
Rate limit login-with-password attempts.
6 years ago
Pēteris Caune
d299feb420
Salt the ip address before hashing
6 years ago
Pēteris Caune
aaa3b2748e
Rate limiting for the "Log In" emails
6 years ago
Pēteris Caune
c1e4595ab2
If user has a single project, _redirect_after_login redirects to it.
6 years ago
Pēteris Caune
6b0d566922
"My Projects" page.
6 years ago
Pēteris Caune
0994006603
Drop Check.user_id and Channel.user_id (obsolete, using project_id now)
6 years ago
Pēteris Caune
16bff94fab
Use BaseTestCase in test_login, less repetition
6 years ago
Pēteris Caune
965998df18
Fix tests.
6 years ago
Pēteris Caune
5aba9d6196
Fix after-login redirects to "Check Details" and other pages.
6 years ago
Pēteris Caune
bf1395801f
Fix after-login redirects for users landing in the "Add Slack" page
6 years ago
Pēteris Caune
9214265136
Separate sign up and login forms.
6 years ago
Pēteris Caune
4acd6a16e8
Login form: rename the email box to "identity" to avoid some auto-signup bots
6 years ago
Pēteris Caune
a58ce791c0
Improved layout & style, fixed hamburger menu in login page.
6 years ago
Pēteris Caune
9cbd0138da
Demo checks shown on welcome page are not saved to database. User's first check is created when creating the user.
7 years ago
Pēteris Caune
a4855e1900
Rename form field "email" to "identity" to hopefully avoid some auto-form-fill spam.
7 years ago
Pēteris Caune
157bd74aeb
Add test for case insensitive email addresses.
7 years ago
Pēteris Caune
965accaedb
REGISTRATION_OPEN setting. superuser accounts by default have team access enabled. Fixes #97 and #113
8 years ago
Pēteris Caune
d9171adb1d
_associate_demo_check was crashing for returning users after cleaning up old checks.
8 years ago
James Moore
b1bb1540b8
adds a SITE_NAME setting that's used to label the site
8 years ago
Di Wu
2ebad09d14
check token redirect to login on bad token
9 years ago
Pēteris Caune
947f686c61
Organize imports using isort.
9 years ago
Pēteris Caune
364e7ebec9
Tests for hc.accounts
9 years ago