From 77ced7ea43a4d58ecacfc10ca8fda1f1e675aafc Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Wed, 10 Nov 2021 10:53:37 +0100 Subject: [PATCH] misc: Forbid non-ascii identifiers That prevents a class of unicode attacks, e.g. invisible characters. --- app/src/lib.rs | 1 + auth/src/lib.rs | 1 + server/src/main.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/app/src/lib.rs b/app/src/lib.rs index 8544398..3937693 100644 --- a/app/src/lib.rs +++ b/app/src/lib.rs @@ -1,4 +1,5 @@ #![recursion_limit = "256"] +#![forbid(non_ascii_idents)] #![allow(clippy::nonstandard_macro_braces)] pub mod components; pub mod infra; diff --git a/auth/src/lib.rs b/auth/src/lib.rs index e29da83..b59fb75 100644 --- a/auth/src/lib.rs +++ b/auth/src/lib.rs @@ -1,3 +1,4 @@ +#![forbid(non_ascii_idents)] #![allow(clippy::nonstandard_macro_braces)] use chrono::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/server/src/main.rs b/server/src/main.rs index 15f22ae..26cef3a 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![forbid(non_ascii_idents)] #![allow(clippy::nonstandard_macro_braces)] use crate::{