Jeremy Lin
c2a324e5da
Clean up domain whitelist logic
* Make `SIGNUPS_DOMAINS_WHITELIST` override the `SIGNUPS_ALLOWED` setting.
Otherwise, a common pitfall is to set `SIGNUPS_DOMAINS_WHITELIST` without
realizing that `SIGNUPS_ALLOWED=false` must also be set.
* Whitespace is now accepted in `SIGNUPS_DOMAINS_WHITELIST`. That is,
`foo.com, bar.com` is now equivalent to `foo.com,bar.com`.
* Add validation on `SIGNUPS_DOMAINS_WHITELIST`. For example, `foo.com,`
is rejected as containing an empty token.
5 years ago
Jeremy Lin
6cd8512bbd
Fix Duo auth failure with non-lowercased email addresses
5 years ago
Jeremy Lin
7407b8326a
Fix attachment size limit calculation
The config values (in KB) need to be converted to bytes when comparing
against total attachment sizes.
5 years ago
Daniel García
94341f9f3f
Fix token error while accepting invite
5 years ago
Daniel García
2ee07ea1d8
Fix empty data when cloning cipher
5 years ago
BlackDex
1b4b40c95d
Updated reqwest to the latest version.
- Use the blocking client (no async).
- Disabled gzip.
- use_sys_proxy is now default.
5 years ago
Daniel García
a30d5f4cf9
Fix cloning issues
5 years ago
Daniel García
3fa78e7bb1
Initial version of policies
5 years ago
Daniel García
70f3ab8ec3
Migrate lazy_static to once_cell, less macro magic and slightly faster
5 years ago
Jeremy Lin
29a0795219
Add backend support for alternate base dir (subdir/subpath) hosting
To use this, include a path in the `DOMAIN` URL, e.g.:
* `DOMAIN=https://example.com/custom-path `
* `DOMAIN=https://example.com/multiple/levels/are/ok `
5 years ago
Daniel García
325039c316
Attachment size limits, per-user and per-organization
5 years ago
Daniel García
f5916ec396
Fix backwards indices
5 years ago
Daniel García
def174a517
Convert email domains to punycode
5 years ago
Daniel García
84ed185579
Update u2f to 0.2, which requires OpenSSL but also might solve the problems we've had with certificates.
The rust image doesn't need installing curl or tar, so removed. Also collapsed ENV lines.
5 years ago
Daniel García
e274af6e3d
Print current server time when failing TOTP, and use chrono as the rest of the server
5 years ago
Daniel García
a0ece3754b
Formatting
5 years ago
Daniel García
912e1f93b7
Fix some lints
5 years ago
Daniel García
adc443ea80
Add endpoint to delete specific U2F key
5 years ago
Daniel García
12928b832c
Fix broken tests
5 years ago
tomuta
bd1e8be328
Implement change-email, email-verification, account-recovery, and welcome notifications
5 years ago
tomuta
64d6f72e6c
Add the ability to disable signups, but allow signups from a whitelist
This feature can be enabled by setting SIGNUPS_ALLOWED=false and
providing a comma-separated list of whitelisted domains in
SIGNUPS_DOMAINS_WHITELIST.
Fixes #727
5 years ago
BlackDex
3f6809bcdf
Fixed issue/request #705
Added a config option to disable time drifted totp codes.
Default is false, since this is what the RFC recommends.
5 years ago
Patrick Li
85dbf4e16c
Don't include excluded global equivalent domains during sync
Fixes #681
5 years ago
Daniel García
e449912f05
Generate recovery codes for email and duo
5 years ago
Daniel García
d29b6bee28
Remove unnecessary clones and other clippy fixes
5 years ago
Miro Prasil
00a11b1b78
Stop leaking usernames when SIGNUPS_ALLOWED=false
This fixes #691 - respond in less specific way to not leak the
fact that user is already registered on the server.
5 years ago
vpl
2edecf34ff
Use user_uuid instead of mut twofactor
5 years ago
vpl
18bc8331f9
Send email when preparing 2FA JsonError
5 years ago
BlackDex
603a964579
Fixed issue #663 .
During the 2fa activation there is no twofactor record yet.
Changed the layout a bit so that it will generate a new twofactor record
when it does not exists yet. Else it will just update the already
existing record.
5 years ago
BlackDex
9466f02696
Recoded TOTP time drift validation
5 years ago
BlackDex
ebf40099f2
Updated authenticator TOTP
- Added security check for previouse used codes
- Allow TOTP codes with 1 step back and forward when there is a time
drift. This means in total 3 codes could be valid. But only newer codes
then the previouse used codes are excepted after that.
5 years ago
BlackDex
edc482c8ea
Changed HIBP Error message.
- Moved the manual link to the check to the top.
- Clearified that hibp is a payed service.
- Changed error logo to hibp logo.
5 years ago
BlackDex
6e5c03cc78
Some modification when no HIBP API Key is set
- Added an URL with the useraccount for manual check.
- Added support for HTTP(S)_PROXY for hibp.
5 years ago
Daniel García
df8114f8be
Updated client kdf iterations to 100000 and fixed some lints
6 years ago
Daniel García
e3404dd322
Use the local scripts instead of cloudflare, remove jquery and update config so disabling a master toggle doesn't remove the values
6 years ago
Daniel García
bfc517ee80
Remove unused warning
6 years ago
Daniel García
4a7d2a1e28
Rename static files endpoint
6 years ago
vpl
c99df1c310
Compare token using crypto::ct_eq
6 years ago
vpl
591ae10144
Get token from single u64
6 years ago
Daniel García
026f9da035
Allow removing users two factors
6 years ago
Daniel García
515b87755a
Update HIBP to v3, requires paid API key, fixes #583
6 years ago
vpl
ad2225b6e5
Add configuration options for Email 2FA
6 years ago
vpl
5609103a97
Use ring to generate email token
6 years ago
vpl
6d460b44b0
Use saved token for email 2fa codes
6 years ago
vpl
efd8d9f528
Remove some unused imports, unneeded mut variables
6 years ago
vpl
29aedd388e
Add email code logic and move two_factor into separate modules
6 years ago
Daniel García
05a1137828
Move backend checks to build.rs to fail fast, and updated dependencies
6 years ago
Emil Madsen
e22e290f67
Fix key and type variable names for mysql
6 years ago
Daniel García
874f5c34bd
Formatting
6 years ago
Daniel García
253faaf023
Use users duo host when required, instead of always using the global one
6 years ago