From 632f4d545367b5ab1cefce66bc526e5dc0a786de Mon Sep 17 00:00:00 2001 From: theycallmesteve <59837464+theycallmesteve@users.noreply.github.com> Date: Thu, 7 May 2020 18:02:37 -0400 Subject: [PATCH 1/2] Whitespace fixes --- src/api/core/ciphers.rs | 6 +----- src/api/core/two_factor/authenticator.rs | 1 + src/config.rs | 1 - src/db/models/device.rs | 1 - src/db/models/organization.rs | 6 +++--- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 482bfe6f..93e06781 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -767,11 +767,7 @@ fn post_attachment_admin( post_attachment(uuid, data, content_type, headers, conn, nt) } -#[post( - "/ciphers//attachment//share", - format = "multipart/form-data", - data = "" -)] +#[post("/ciphers//attachment//share", format = "multipart/form-data", data = "")] fn post_attachment_share( uuid: String, attachment_id: String, diff --git a/src/api/core/two_factor/authenticator.rs b/src/api/core/two_factor/authenticator.rs index f47d63b1..d9e8f494 100644 --- a/src/api/core/two_factor/authenticator.rs +++ b/src/api/core/two_factor/authenticator.rs @@ -20,6 +20,7 @@ pub fn routes() -> Vec { activate_authenticator_put, ] } + #[post("/two-factor/get-authenticator", data = "")] fn generate_authenticator(data: JsonUpcase, headers: Headers, conn: DbConn) -> JsonResult { let data: PasswordData = data.into_inner().data; diff --git a/src/config.rs b/src/config.rs index db6ce05c..7c918ecd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -135,7 +135,6 @@ macro_rules! make_config { (inner._env.build(), inner.config.clone()) }; - fn _get_form_type(rust_type: &str) -> &'static str { match rust_type { "Pass" => "password", diff --git a/src/db/models/device.rs b/src/db/models/device.rs index 530df441..8b6bf2c3 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -77,7 +77,6 @@ impl Device { let orguser: Vec<_> = orgs.iter().filter(|o| o.atype == 2).map(|o| o.org_uuid.clone()).collect(); let orgmanager: Vec<_> = orgs.iter().filter(|o| o.atype == 3).map(|o| o.org_uuid.clone()).collect(); - // Create the JWT claims struct, to send to the client use crate::auth::{encode_jwt, LoginJWTClaims, DEFAULT_VALIDITY, JWT_LOGIN_ISSUER}; let claims = LoginJWTClaims { diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 1fb94a73..4ff0c56b 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -165,9 +165,9 @@ impl Organization { "UsePolicies": true, "BusinessName": null, - "BusinessAddress1": null, - "BusinessAddress2": null, - "BusinessAddress3": null, + "BusinessAddress1": null, + "BusinessAddress2": null, + "BusinessAddress3": null, "BusinessCountry": null, "BusinessTaxNumber": null, From 42e37ebea1ae8fe25c861d0a073a67973f89e4a1 Mon Sep 17 00:00:00 2001 From: theycallmesteve <59837464+theycallmesteve@users.noreply.github.com> Date: Thu, 7 May 2020 18:05:17 -0400 Subject: [PATCH 2/2] Apply upstream global domain values and whitespace fixes --- src/static/global_domains.json | 116 ++++++++++++++++----------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/static/global_domains.json b/src/static/global_domains.json index 4fc732e3..0e6163dd 100644 --- a/src/static/global_domains.json +++ b/src/static/global_domains.json @@ -108,7 +108,9 @@ "microsoftonline.com", "office365.com", "microsoftstore.com", - "xbox.com" + "xbox.com", + "azure.com", + "windowsazure.com" ], "Excluded": false }, @@ -126,8 +128,7 @@ "Type": 12, "Domains": [ "overture.com", - "yahoo.com", - "flickr.com" + "yahoo.com" ], "Excluded": false }, @@ -192,7 +193,6 @@ "amazon.it", "amazon.com.au", "amazon.co.nz", - "amazon.co.jp", "amazon.in" ], "Excluded": false @@ -777,69 +777,69 @@ "Excluded": false }, { - "Type": 76, - "Domains": [ - "docusign.com", - "docusign.net" - ], - "Excluded": false + "Type": 76, + "Domains": [ + "docusign.com", + "docusign.net" + ], + "Excluded": false }, { - "Type": 77, - "Domains": [ - "envato.com", - "themeforest.net", - "codecanyon.net", - "videohive.net", - "audiojungle.net", - "graphicriver.net", - "photodune.net", - "3docean.net" - ], - "Excluded": false + "Type": 77, + "Domains": [ + "envato.com", + "themeforest.net", + "codecanyon.net", + "videohive.net", + "audiojungle.net", + "graphicriver.net", + "photodune.net", + "3docean.net" + ], + "Excluded": false }, { - "Type": 78, - "Domains": [ - "x10hosting.com", - "x10premium.com" - ], - "Excluded": false + "Type": 78, + "Domains": [ + "x10hosting.com", + "x10premium.com" + ], + "Excluded": false }, { - "Type": 79, - "Domains": [ - "dnsomatic.com", - "opendns.com", - "umbrella.com" - ], - "Excluded": false + "Type": 79, + "Domains": [ + "dnsomatic.com", + "opendns.com", + "umbrella.com" + ], + "Excluded": false }, { - "Type": 80, - "Domains": [ - "cagreatamerica.com", - "canadaswonderland.com", - "carowinds.com", - "cedarfair.com", - "cedarpoint.com", - "dorneypark.com", - "kingsdominion.com", - "knotts.com", - "miadventure.com", - "schlitterbahn.com", - "valleyfair.com", - "visitkingsisland.com", - "worldsoffun.com" - ], - "Excluded": false + "Type": 80, + "Domains": [ + "cagreatamerica.com", + "canadaswonderland.com", + "carowinds.com", + "cedarfair.com", + "cedarpoint.com", + "dorneypark.com", + "kingsdominion.com", + "knotts.com", + "miadventure.com", + "schlitterbahn.com", + "valleyfair.com", + "visitkingsisland.com", + "worldsoffun.com" + ], + "Excluded": false }, { - "Type": 81, - "Domains": [ - "ubnt.com", - "ui.com" - ], - "Excluded": false + "Type": 81, + "Domains": [ + "ubnt.com", + "ui.com" + ], + "Excluded": false } ]