mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-19 00:55:56 +02:00
* Modernize Rust code and fix input handling - Adopt newer std APIs, reduce allocations, and consolidate caching on Moka. - Update the Rust toolchain and most dependencies, tighten lints, and expand test coverage. - Fix favicon ranking for URLs with query strings or fragments, and try the next icon when SVG sanitization fails. - Prevent panics when masking 2FA email addresses containing Unicode or missing an @. - Prevent panics on Unicode database paths and recognize short postgres: URLs. - Treat whitespace-only collection and member external IDs as absent and avoid redundant membership updates. - Align stable builds’ global IP classification with Rust’s standard library. Signed-off-by: BlackDex <black.dex@gmail.com> * Update crates and some fixes - Bump Rocket, rocket_ws, Diesel, SQLite bindings, and html5gum. - Reuse WebSocket payload buffers and detect upgrades from the response. - Match favicon rel tokens case-insensitively, honor the first base href, and stop scanning at the end of the head or the start of the body. Signed-off-by: BlackDex <black.dex@gmail.com> --------- Signed-off-by: BlackDex <black.dex@gmail.com>
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
---
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
|
|
hooks:
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-toml
|
|
- id: mixed-line-ending
|
|
args: [ "--fix=no" ]
|
|
- id: end-of-file-fixer
|
|
exclude: "(.*js$|.*css$)"
|
|
- id: check-case-conflict
|
|
- id: check-merge-conflict
|
|
- id: detect-private-key
|
|
- id: check-symlinks
|
|
- id: forbid-submodules
|
|
|
|
# When this version is updated, do not forget to update this in `.github/workflows/typos.yaml` too
|
|
- repo: https://github.com/crate-ci/typos
|
|
rev: 7f9d0819ca1c008ade73f4b41fa9d258d48f605b # v1.51.1
|
|
hooks:
|
|
- id: typos
|
|
always_run: true
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: fmt
|
|
name: fmt
|
|
description: Format files with cargo fmt.
|
|
entry: cargo fmt
|
|
language: system
|
|
always_run: true
|
|
pass_filenames: false
|
|
args: [ "--", "--check" ]
|
|
- id: cargo-test
|
|
name: cargo test
|
|
description: Test the package for errors.
|
|
entry: cargo test
|
|
language: system
|
|
args: [ "--features", "sqlite,mysql,postgresql,enable_mimalloc,s3,unsafe_test_mode", "--" ]
|
|
types_or: [ rust, toml ] # Cargo.lock matches toml type which is intended
|
|
pass_filenames: false
|
|
- id: cargo-clippy
|
|
name: cargo clippy
|
|
description: Lint Rust sources
|
|
entry: cargo clippy
|
|
language: system
|
|
args: [ "--features", "sqlite,mysql,postgresql,enable_mimalloc,s3,unsafe_test_mode", "--", "-D", "warnings" ]
|
|
types_or: [ rust, toml ] # Cargo.lock matches toml type which is intended
|
|
pass_filenames: false
|
|
- id: check-docker-templates
|
|
name: check docker templates
|
|
description: Check if the Docker templates are updated
|
|
language: system
|
|
entry: sh
|
|
args:
|
|
- "-c"
|
|
- "cd docker && make"
|