Update rocket_csrf and enable protection again
This commit is contained in:
parent
995c173146
commit
c0d0f98d1f
|
@ -1464,7 +1464,7 @@ dependencies = [
|
|||
"rocket 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)",
|
||||
"rocket_codegen 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)",
|
||||
"rocket_contrib 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)",
|
||||
"rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=6fc55d26f91f057a20e89ece71d4443e797e7d21)",
|
||||
"rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=90a4aeca839c7de914bf10e5cd1288a8054a069a)",
|
||||
"rocket_i18n 0.1.1 (git+https://github.com/BaptisteGelez/rocket_i18n?rev=75a3bfd7b847324c078a355a7f101f8241a9f59b)",
|
||||
"rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.77 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1828,7 +1828,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "rocket_csrf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/fdb-hiroshima/rocket_csrf?rev=6fc55d26f91f057a20e89ece71d4443e797e7d21#6fc55d26f91f057a20e89ece71d4443e797e7d21"
|
||||
source = "git+https://github.com/fdb-hiroshima/rocket_csrf?rev=90a4aeca839c7de914bf10e5cd1288a8054a069a#90a4aeca839c7de914bf10e5cd1288a8054a069a"
|
||||
dependencies = [
|
||||
"csrf 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2912,7 +2912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum rocket_codegen 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)" = "<none>"
|
||||
"checksum rocket_codegen_next 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)" = "<none>"
|
||||
"checksum rocket_contrib 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)" = "<none>"
|
||||
"checksum rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=6fc55d26f91f057a20e89ece71d4443e797e7d21)" = "<none>"
|
||||
"checksum rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=90a4aeca839c7de914bf10e5cd1288a8054a069a)" = "<none>"
|
||||
"checksum rocket_http 0.4.0-dev (git+https://github.com/SergioBenitez/Rocket?rev=55459db7732b9a240826a5c120c650f87e3372ce)" = "<none>"
|
||||
"checksum rocket_i18n 0.1.1 (git+https://github.com/BaptisteGelez/rocket_i18n?rev=75a3bfd7b847324c078a355a7f101f8241a9f59b)" = "<none>"
|
||||
"checksum rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d127299b02abda51634f14025aec43ae87a7aa7a95202b6a868ec852607d1451"
|
||||
|
|
|
@ -47,7 +47,7 @@ rev = "55459db7732b9a240826a5c120c650f87e3372ce"
|
|||
|
||||
[dependencies.rocket_csrf]
|
||||
git = "https://github.com/fdb-hiroshima/rocket_csrf"
|
||||
rev = "6fc55d26f91f057a20e89ece71d4443e797e7d21"
|
||||
rev = "90a4aeca839c7de914bf10e5cd1288a8054a069a"
|
||||
|
||||
[dependencies.rocket_i18n]
|
||||
git = "https://github.com/BaptisteGelez/rocket_i18n"
|
||||
|
|
16
src/main.rs
16
src/main.rs
|
@ -145,13 +145,13 @@ fn main() {
|
|||
rocket_i18n::tera(&mut engines.tera);
|
||||
}))
|
||||
.attach(rocket_i18n::I18n::new("plume"))
|
||||
// .attach(CsrfFairingBuilder::new()
|
||||
// .set_default_target("/csrf-violation?target=<uri>".to_owned(), rocket::http::Method::Post)
|
||||
// .add_exceptions(vec![
|
||||
// ("/inbox".to_owned(), "/inbox".to_owned(), rocket::http::Method::Post),
|
||||
// ("/@/<name>/inbox".to_owned(), "/@/<name>/inbox".to_owned(), rocket::http::Method::Post),
|
||||
// ("/~/<blog>/<slug>".to_owned(), "/~/<blog>/<slug>".to_owned(), rocket::http::Method::Post),
|
||||
// ])
|
||||
// .finalize().unwrap())
|
||||
.attach(CsrfFairingBuilder::new()
|
||||
.set_default_target("/csrf-violation?target=<uri>".to_owned(), rocket::http::Method::Post)
|
||||
.add_exceptions(vec![
|
||||
("/inbox".to_owned(), "/inbox".to_owned(), rocket::http::Method::Post),
|
||||
("/@/<name>/inbox".to_owned(), "/@/<name>/inbox".to_owned(), rocket::http::Method::Post),
|
||||
("/~/<blog>/<slug>".to_owned(), "/~/<blog>/<slug>".to_owned(), rocket::http::Method::Post),
|
||||
])
|
||||
.finalize().unwrap())
|
||||
.launch();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue