actix-csrf-middleware 0.5.4

CSRF protection middleware for Actix Web applications. Supports double submit cookie and synchronizer token patterns (with actix-session) out of the box. Flexible, easy to configure, and includes test coverage for common attacks and edge cases.
Documentation
[[bench]]
harness = false
name = "csrf_token"
path = "benches/csrf_token.rs"

[[bench]]
harness = false
name = "hmac_token"
path = "benches/hmac_token.rs"

[dependencies.actix-http]
version = "3.10"

[dependencies.actix-session]
features = ["cookie-session"]
optional = true
version = "0.10"

[dependencies.actix-utils]
version = "3.0.1"

[dependencies.actix-web]
features = ["compat", "secure-cookies"]
version = "4"

[dependencies.base64]
version = "0.22.1"

[dependencies.futures-util]
version = "0.3.31"

[dependencies.hex]
version = "0.4.3"

[dependencies.hmac]
version = "0.12"

[dependencies.log]
version = "0.4.27"

[dependencies.pin-project-lite]
version = "0.2.16"

[dependencies.rand]
version = "0.9.1"

[dependencies.serde_json]
version = "1.0.140"

[dependencies.serde_urlencoded]
version = "0.7.1"

[dependencies.sha2]
version = "0.10"

[dependencies.subtle]
version = "2.6"

[dependencies.url]
version = "2.5"

[dependencies.zeroize]
version = "1"

[dev-dependencies.actix-multipart]
version = "0.7.2"

[dev-dependencies.actix-rt]
version = "2.10"

[dev-dependencies.criterion]
version = "0.5"

[dev-dependencies.proptest]
version = "1.4"

[features]
session = ["actix-session"]

[lib]
crate-type = ["rlib"]
name = "actix_csrf_middleware"
path = "src/lib.rs"

[package]
authors = ["Andrew <zeek@tuta.com>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
description = "CSRF protection middleware for Actix Web applications. Supports double submit cookie and synchronizer token patterns (with actix-session) out of the box. Flexible, easy to configure, and includes test coverage for common attacks and edge cases."
documentation = "https://docs.rs/actix-csrf-middleware"
edition = "2021"
exclude = ["examples/**"]
keywords = ["security", "csrf", "web", "middleware", "actix-web"]
license = "MIT"
name = "actix-csrf-middleware"
readme = "README.md"
repository = "https://github.com/yoozzeek/actix-csrf-middleware"
rust-version = "1.70.0"
version = "0.5.4"

[[test]]
name = "core_common"
path = "tests/core_common.rs"

[[test]]
name = "csrf_request_ext"
path = "tests/csrf_request_ext.rs"

[[test]]
name = "double_submit_cookie"
path = "tests/double_submit_cookie.rs"

[[test]]
name = "limits_and_skip"
path = "tests/limits_and_skip.rs"

[[test]]
name = "property_hmac"
path = "tests/property_hmac.rs"

[[test]]
name = "security_a01_access_control"
path = "tests/security_a01_access_control.rs"

[[test]]
name = "security_a02_crypto_failures"
path = "tests/security_a02_crypto_failures.rs"

[[test]]
name = "security_a03_injection"
path = "tests/security_a03_injection.rs"

[[test]]
name = "security_origin"
path = "tests/security_origin.rs"

[[test]]
name = "synchronizer_token"
path = "tests/synchronizer_token.rs"