3066 Коммитов (73ab4327c29b3e5f65e5c26b5f86418612daa972)
 

Автор SHA1 Сообщение Дата
Dimitri Huisman 8784971b7f Merge rate limiting and failed login logging 4 лет назад
Dimitri Huisman a01df56a9b Forgot to include the new endpoint /static 4 лет назад
Dimitri Huisman edb76f25d8 Update newsfragment 4 лет назад
Dimitri Huisman 8eabece225 Update reverse proxy doc with new /sso endpoint. 4 лет назад
Dimitri Huisman 503044ef6e Reintroduce ProxyFix. Use two buttons for logging in. 4 лет назад
Dimitri Huisman c42ad8e71e Forgot to include changes for url_for of base.html 4 лет назад
Dimitri Huisman fb0f005343 Get rid of complicated prefix logic. Further simplify /static handling and nginx config. 4 лет назад
Dimitri Huisman da788ddee3 Merge branch 'fix-sso-1929' of github.com:Diman0/Mailu into fix-sso-1929 4 лет назад
Dimitri Huisman bdcc183165 Redirect to configured ENV VAR for Admin/Webmail, further simplify nginx config. 4 лет назад
Dimitri Huisman f1a60aa6ea Remove unneeded auth_request_set 4 лет назад
Florent Daigniere fee13e6c4b Save a redirect 4 лет назад
Florent Daigniere d3f07a0882 Simplify the handling of /static 4 лет назад
Florent Daigniere aee089f3b1 Ensure that static assets are readable 4 лет назад
Dimitri Huisman a47afec4ee Make logic more readable. 4 лет назад
Dimitri Huisman 48764f0400 Ensure all requests from the page sso go through the page sso. 4 лет назад
Dimitri Huisman 5232bd38fd Simplify webmail logout. 4 лет назад
Dimitri Huisman aab258d284 Move handling of logging out in admin, to sso logout page. 4 лет назад
Dimitri Huisman 615743b331 Improve indendation of conditions. 4 лет назад
Dimitri Huisman 5d81846c5d Introduce the shared stub /static for providing all static files 4 лет назад
Dimitri Huisman eb74a72a52 Moved locations to correct area in nginx.conf. 4 лет назад
Dimitri Huisman edc00a4af3
Merge pull request #2024 from Diman0/1932-org-cleanup
Modified trusted authors mergify config as disccused in #1932
4 лет назад
Dimitri Huisman f2474c968e Modified trusted authors mergify config as disccused in #1932 4 лет назад
Dimitri Huisman aa7380ffba Doh! 4 лет назад
Dimitri Huisman 44d2448412 Updated SSO logic for webmails. Fixed small bug rate limiting. 4 лет назад
Dimitri Huisman f9eee0cbaf Adapt HEALTHCHECK to new URL 4 лет назад
Dimitri Huisman ed7adf52a6 Merge branch 'master' of github.com:Diman0/Mailu into fix-sso-1929 4 лет назад
Dimitri Huisman 913a6304a7 Finishing touches. Introduce /static stub for handling all static files. 4 лет назад
bors[bot] a1192d8039
Merge #1987
1987: Enhancement to the rate limits r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Turn the rate-limiters into something useful (that won't fire for no reason).

- fix rate-limiting on /webdav/
- it changes the rate-limiting behaviour from limiting a single IP address to a subnet of a reasonable size (/24 on v4 and /56 on v6 both are now configurable) : AUTH_RATELIMIT_IP / AUTH_RATELIMIT_IP_V4_MASK / AUTH_RATELIMIT_IP_V6_MASK
- It ensures we only use IP-based rate-limits for attempts on accounts that do not exist
- it creates a new rate limit preventing attackers from targetting a specific user account (separate from what's above) : AUTH_RATELIMIT_USER
- it introduces a rate limiting exemption mechanism whereby, upon authentication, users will see their source-ip address being exempt for a specific amount of time AUTH_RATELIMIT_EXEMPTION_LENGTH. A similar mechanism is available for web-based sessions (see below)
- It introduces in AUTH_RATELIMIT_EXEMPTION a comma separated list of network CIDRs that will be exempt from both types of rate limiting
- it implements device-tokens, as described on https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies to ensure that genuine users aren't locked-out by a malicious attacker abusing the rate-limit feature.

Things that could be improved include:
- the IP-based rate limiter flags attempts against "non-existing" accounts: it could go further and flag the number of unique non-existing accounts attempted (to prevent the case of a user making a typo in his MUA configuration)
- the IP address exemption mechanism doesn't pin the exemption to a specific username: any real user can trivially bypass the rate limits (and attempt to brute-force someone else's account)

### Related issue(s)
- close #1926
- close #1745 
- close #1915


## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Diman0 <diman@huisman.xyz>
Co-authored-by: Florent Daigniere <nextgens@users.noreply.github.com>
4 лет назад
Florent Daigniere 693b578bbb The second strip isn't necessary 4 лет назад
Florent Daigniere 1c6165213c better that way 4 лет назад
Florent Daigniere 34497cff20 doh 4 лет назад
Florent Daigniere e8871dd77f doh 4 лет назад
bors[bot] fc633826da
Merge #2019
2019: Update Chinese translation r=mergify[bot] a=qy117121

Fix wrong text

## What type of PR?

(Feature, enhancement, bug-fix, documentation)

## What does this PR do?

### Related issue(s)
- Mention an issue like: #001
- Auto close an issue like: closes #001

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: qy117121 <mixuan121@gmail.com>
4 лет назад
Florent Daigniere 5b72c32251 Doh 4 лет назад
Florent Daigniere 19b784b198 Parse the network configuration only once
thanks @ghostwheel42
4 лет назад
Florent Daigniere 98742268e6 Make it more readable 4 лет назад
Florent Daigniere 94bbed9746 Ensure we have the right IP 4 лет назад
Florent Daigniere c5bd82650f doh 4 лет назад
Florent Daigniere 99c81c20a7 Introduce AUTH_RATELIMIT_EXEMPTION
This disables rate limiting on specific CIDRs
4 лет назад
Florent Daigniere c674f1567a Merge branch 'ratelimits' of https://github.com/nextgens/Mailu into ratelimits 4 лет назад
Florent Daigniere 8414dd5cf0 Merge remote-tracking branch 'upstream/master' into ratelimits 4 лет назад
Florent Daigniere e14d2e7c03 Error out explictely if Auth-Port isn't set 4 лет назад
Florent Daigniere abaa2e8cc3 simplify client_ip 4 лет назад
Florent Daigniere de276a6822 Simplify extract_network_from_ip 4 лет назад
Florent Daigniere 3bda8368e4 simplify the Auth-Status check 4 лет назад
Florent Daigniere 2dd9ea1506 simplify 4 лет назад
Florent Daigniere 068170c0ff Use app instead of flask.current_app where possible 4 лет назад
Florent Daigniere 4fff45bb30 Fix typo 4 лет назад
Florent Daigniere 265ab7b5af Remove PASSWORD_SCHEME from test envs 4 лет назад
Florent Daigniere 57b0dd490c Initialize user_email in all cases 4 лет назад