1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

1582 Commits

Author SHA1 Message Date
49e8fe57f4 Improve errors when MAS contacts the Synapse homeserver (#2794)
* Add some drive-by docstrings

* Change text rendering of catch_http_codes::HttpError

Using `#[source]` is unnatural here because it makes it look like
two distinct errors (one being a cause of the other),
when in reality it is just one error, with 2 parts.

Using `Display` formatting for that leads to a more natural error.

* Add constraints to `catch_http_code{,s}` methods

Not strictly required, but does two things:

- documents what kind of function is expected
- provides a small extra amount of type enforcement at the call site,
  rather than later on when you find the result doesn't implement Service

* Add a `catch_http_errors` shorthand

Nothing major, just a quality of life improvement so you don't have to
repetitively write out what a HTTP error is

* Unexpected error page: remove leading whitespace from preformatted 'details' section

The extra whitespace was probably unintentional and makes the error harder to read,
particularly when it wraps onto a new line unnecessarily

* Capture and log Matrix errors received from Synapse

* Drive-by clippy fix: use clamp instead of min().max()

* Convert `err(Display)` to `err(Debug)` for `anyhow::Error`s in matrix-synapse support module
2024-06-07 11:14:04 +00:00
d76b54b13f Add a setPassword GraphQL mutation for setting a user's password (#2820)
* Feed `PasswordManager` through to the GraphQL `State`

* Add `setPassword` GraphQL mutation to update a user's password
2024-06-05 18:04:17 +01:00
fa0dec737b Use headers API
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-05-30 10:52:53 +02:00
683516bb66 Allow parameters in UserInfo endpoint's response's content-type
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-05-30 10:52:53 +02:00
206d45bb31 Merge the mas_graphql crate into the mas_handlers crate (#2783) 2024-05-17 17:22:34 +01:00
37a10aea96 Use Reverse() helper instead of sorting then reversing 2024-05-16 16:39:57 +02:00
d20b0a04fe 'migration' -> 'database migration' in startup output 2024-05-16 16:39:57 +02:00
f8bfad37a1 Fix typos in doctor command output 2024-05-16 16:39:57 +02:00
d061d7f6b3 Move tokio to a workspace dependency 2024-05-15 14:54:34 +02:00
098f7fba03 Move async-graphql to workspace deps & disable apollo tracing 2024-05-15 14:54:34 +02:00
c8e074c8e2 Don't panic when the repository fails on the introspection endpoint 2024-05-15 14:15:11 +02:00
359da66b88 Display a user-friendly error on CAPTCHA failures 2024-05-15 09:38:10 +02:00
e4d6bbee14 Disable hCaptcha compatibility with reCAPTCHA 2024-05-15 09:38:10 +02:00
4d9d8a8ba3 Actually verify the CAPTCHA during registration 2024-05-15 09:38:10 +02:00
0e270d5449 hCaptcha support 2024-05-15 09:38:10 +02:00
f9ae7ae313 Cloudflare Turnstile support 2024-05-15 09:38:10 +02:00
a3beeb2398 Render reCAPTCHA challenge on the registration form 2024-05-15 09:38:10 +02:00
5ed10e0e06 build(deps): bump wasmtime from 20.0.1 to 20.0.2
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 20.0.1 to 20.0.2.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v20.0.1...v20.0.2)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 10:20:37 +02:00
036a778af6 build(deps): bump rustls-pki-types from 1.5.0 to 1.7.0
Bumps [rustls-pki-types](https://github.com/rustls/pki-types) from 1.5.0 to 1.7.0.
- [Release notes](https://github.com/rustls/pki-types/releases)
- [Commits](https://github.com/rustls/pki-types/compare/v/1.5.0...v/1.7.0)

---
updated-dependencies:
- dependency-name: rustls-pki-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 10:20:28 +02:00
ba7b029128 build(deps): bump psl from 2.1.36 to 2.1.37
Bumps [psl](https://github.com/addr-rs/psl) from 2.1.36 to 2.1.37.
- [Release notes](https://github.com/addr-rs/psl/releases)
- [Commits](https://github.com/addr-rs/psl/compare/v2.1.36...v2.1.37)

---
updated-dependencies:
- dependency-name: psl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 10:20:16 +02:00
353815bc6f Skip the device code form when using the full verification URI
This changes the form to use a GET method, as it is only really doing
a redirect.
2024-05-07 12:19:10 +02:00
eb80ca1c88 build(deps): bump wasmtime from 20.0.0 to 20.0.1
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 20.0.0 to 20.0.1.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v20.0.0...v20.0.1)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 07:33:59 +02:00
535985717b build(deps): bump prometheus from 0.13.3 to 0.13.4
Bumps [prometheus](https://github.com/tikv/rust-prometheus) from 0.13.3 to 0.13.4.
- [Changelog](https://github.com/tikv/rust-prometheus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tikv/rust-prometheus/compare/v0.13.3...v0.13.4)

---
updated-dependencies:
- dependency-name: prometheus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 07:33:05 +02:00
736faf1738 build(deps): bump psl from 2.1.35 to 2.1.36
Bumps [psl](https://github.com/addr-rs/psl) from 2.1.35 to 2.1.36.
- [Release notes](https://github.com/addr-rs/psl/releases)
- [Commits](https://github.com/addr-rs/psl/compare/v2.1.35...v2.1.36)

---
updated-dependencies:
- dependency-name: psl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 07:32:38 +02:00
3978acd94e Fix recently added Clippy lints
This also ignores the clippy::blocks_in_conditions lint in two crates,
until tracing gets fixed: https://github.com/tokio-rs/tracing/issues/2876
2024-05-07 07:32:02 +02:00
24021cc984 matrix-synapse: urlencode parameters before sending them to Synapse 2024-05-03 16:56:56 +02:00
6db50f098d Allow more characters in device IDs 2024-05-03 16:56:56 +02:00
8e513ea3cc Update Cargo.lock and update cargo-deny exceptions 2024-05-02 14:32:05 +02:00
a99427e942 Move lettre to a workspace dependency 2024-05-02 14:32:05 +02:00
3567f7c445 Upgrade minijinja to 2.0.1 2024-05-02 14:04:14 +02:00
0a3ed88921 build(deps): bump pest_derive from 2.7.8 to 2.7.10
Bumps [pest_derive](https://github.com/pest-parser/pest) from 2.7.8 to 2.7.10.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.8...v2.7.10)

---
updated-dependencies:
- dependency-name: pest_derive
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 11:15:33 +02:00
749f71364e mas-i18n: box the sprintf parser error variant 2024-05-02 10:58:25 +02:00
b5a2092a3e build(deps): bump pest from 2.7.8 to 2.7.10
Bumps [pest](https://github.com/pest-parser/pest) from 2.7.8 to 2.7.10.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.8...v2.7.10)

---
updated-dependencies:
- dependency-name: pest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 10:58:25 +02:00
9e2530861f Disable wasmtime cache, enable parallel compilation, add deny exception 2024-05-02 10:35:59 +02:00
18c5ca8474 build(deps): bump wasmtime from 18.0.3 to 20.0.0
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 18.0.3 to 20.0.0.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v18.0.3...v20.0.0)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 10:35:59 +02:00
ce617f624f build(deps): bump psl from 2.1.34 to 2.1.35
Bumps [psl](https://github.com/addr-rs/psl) from 2.1.34 to 2.1.35.
- [Release notes](https://github.com/addr-rs/psl/releases)
- [Commits](https://github.com/addr-rs/psl/compare/v2.1.34...v2.1.35)

---
updated-dependencies:
- dependency-name: psl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 09:35:10 +02:00
89adac0873 build(deps): bump crc from 3.0.1 to 3.2.1
Bumps [crc](https://github.com/mrhooray/crc-rs) from 3.0.1 to 3.2.1.
- [Release notes](https://github.com/mrhooray/crc-rs/releases)
- [Commits](https://github.com/mrhooray/crc-rs/compare/3.0.1...3.2.1)

---
updated-dependencies:
- dependency-name: crc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 22:34:40 +02:00
8473dbd309 build(deps): bump rustls-pemfile from 2.1.1 to 2.1.2
Bumps [rustls-pemfile](https://github.com/rustls/pemfile) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/2.1.1...v/2.1.2)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 22:34:14 +02:00
3d04495856 build(deps): bump rustls-pki-types from 1.3.1 to 1.5.0
Bumps [rustls-pki-types](https://github.com/rustls/pki-types) from 1.3.1 to 1.5.0.
- [Release notes](https://github.com/rustls/pki-types/releases)
- [Commits](https://github.com/rustls/pki-types/compare/v/1.3.1...v/1.5.0)

---
updated-dependencies:
- dependency-name: rustls-pki-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 20:36:04 +02:00
cd0d05cd49 build(deps): bump regex from 1.10.3 to 1.10.4
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 19:43:16 +02:00
efaf407f9d build(deps): bump insta from 1.36.1 to 1.38.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.36.1 to 1.38.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.36.1...1.38.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 19:13:29 +02:00
c5b831d855 build(deps): bump der from 0.7.8 to 0.7.9
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.8 to 0.7.9.
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.8...der/v0.7.9)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 19:13:14 +02:00
fd985943d3 build(deps): bump psl from 2.1.28 to 2.1.34
Bumps [psl](https://github.com/addr-rs/psl) from 2.1.28 to 2.1.34.
- [Release notes](https://github.com/addr-rs/psl/releases)
- [Commits](https://github.com/addr-rs/psl/compare/v2.1.28...v2.1.34)

---
updated-dependencies:
- dependency-name: psl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 18:12:49 +02:00
9fe842d254 build(deps): bump serde_with from 3.7.0 to 3.8.1
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 18:12:31 +02:00
43f4768ae6 build(deps): bump tokio from 1.36.0 to 1.37.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.36.0 to 1.37.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.36.0...tokio-1.37.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 18:11:14 +02:00
5c4c7355a1 build(deps): bump socket2 from 0.5.6 to 0.5.7
Bumps [socket2](https://github.com/rust-lang/socket2) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/rust-lang/socket2/releases)
- [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/socket2/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: socket2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 17:50:55 +02:00
aae06f1233 build(deps): bump libc from 0.2.153 to 0.2.154
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.153 to 0.2.154.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.153...0.2.154)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 16:56:11 +02:00
c4d4f74a67 build(deps): bump arc-swap from 1.7.0 to 1.7.1
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.7.0 to 1.7.1.
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: arc-swap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 16:54:10 +02:00
fb207c745b build(deps): bump wiremock from 0.5.22 to 0.6.0
Bumps [wiremock](https://github.com/LukeMathWalker/wiremock-rs) from 0.5.22 to 0.6.0.
- [Changelog](https://github.com/LukeMathWalker/wiremock-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/LukeMathWalker/wiremock-rs/compare/v0.5.22...v0.6.0)

---
updated-dependencies:
- dependency-name: wiremock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 16:20:16 +02:00
2832eb7b48 build(deps): bump serde_yaml from 0.9.33 to 0.9.34+deprecated
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.33 to 0.9.34+deprecated.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.33...0.9.34)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 15:10:36 +02:00