aboutsummaryrefslogtreecommitdiff
path: root/src/api/core
diff options
context:
space:
mode:
authortuhana <[email protected]>2023-10-05 20:08:26 +0300
committertuhana <[email protected]>2023-10-05 20:08:26 +0300
commit3d4be24902983a94a601aabe016d6e773e888cd9 (patch)
treeb85aea35f08fb5e0e9a81e2aeee4258032e8275d /src/api/core
parentbc26bfa589c007da9b9be37e1172060f38a948b9 (diff)
downloadvaultwarden-3d4be24902983a94a601aabe016d6e773e888cd9.tar.gz
vaultwarden-3d4be24902983a94a601aabe016d6e773e888cd9.zip
Fix typos
Diffstat (limited to 'src/api/core')
-rw-r--r--src/api/core/accounts.rs8
-rw-r--r--src/api/core/ciphers.rs6
-rw-r--r--src/api/core/emergency_access.rs2
-rw-r--r--src/api/core/organizations.rs8
-rw-r--r--src/api/core/two_factor/authenticator.rs2
5 files changed, 13 insertions, 13 deletions
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs
index 63df6194..68269529 100644
--- a/src/api/core/accounts.rs
+++ b/src/api/core/accounts.rs
@@ -346,7 +346,7 @@ async fn post_password(
let save_result = user.save(&mut conn).await;
- // Prevent loging out the client where the user requested this endpoint from.
+ // Prevent logging out the client where the user requested this endpoint from.
// If you do logout the user it will causes issues at the client side.
// Adding the device uuid will prevent this.
nt.send_logout(&user, Some(headers.device.uuid)).await;
@@ -493,7 +493,7 @@ async fn post_rotatekey(data: JsonUpcase<KeyData>, headers: Headers, mut conn: D
let save_result = user.save(&mut conn).await;
- // Prevent loging out the client where the user requested this endpoint from.
+ // Prevent logging out the client where the user requested this endpoint from.
// If you do logout the user it will causes issues at the client side.
// Adding the device uuid will prevent this.
nt.send_logout(&user, Some(headers.device.uuid)).await;
@@ -970,10 +970,10 @@ async fn put_device_token(uuid: &str, data: JsonUpcase<PushToken>, headers: Head
device.push_uuid = Some(uuid::Uuid::new_v4().to_string());
}
if let Err(e) = device.save(&mut conn).await {
- err!(format!("An error occured while trying to save the device push token: {e}"));
+ err!(format!("An error occurred while trying to save the device push token: {e}"));
}
if let Err(e) = register_push_device(headers.user.uuid, device).await {
- err!(format!("An error occured while proceeding registration of a device: {e}"));
+ err!(format!("An error occurred while proceeding registration of a device: {e}"));
}
Ok(())
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
index 43702219..43e007ab 100644
--- a/src/api/core/ciphers.rs
+++ b/src/api/core/ciphers.rs
@@ -1752,7 +1752,7 @@ impl CipherSyncData {
let cipher_folders: HashMap<String, String>;
let cipher_favorites: HashSet<String>;
match sync_type {
- // User Sync supports Folders and Favorits
+ // User Sync supports Folders and Favorites
CipherSyncType::User => {
// Generate a HashMap with the Cipher UUID as key and the Folder UUID as value
cipher_folders = FolderCipher::find_by_user(user_uuid, conn).await.into_iter().collect();
@@ -1760,7 +1760,7 @@ impl CipherSyncData {
// Generate a HashSet of all the Cipher UUID's which are marked as favorite
cipher_favorites = Favorite::get_all_cipher_uuid_by_user(user_uuid, conn).await.into_iter().collect();
}
- // Organization Sync does not support Folders and Favorits.
+ // Organization Sync does not support Folders and Favorites.
// If these are set, it will cause issues in the web-vault.
CipherSyncType::Organization => {
cipher_folders = HashMap::with_capacity(0);
@@ -1805,7 +1805,7 @@ impl CipherSyncData {
.map(|collection_group| (collection_group.collections_uuid.clone(), collection_group))
.collect();
- // Get all organizations that the user has full access to via group assignement
+ // Get all organizations that the user has full access to via group assignment
let user_group_full_access_for_organizations: HashSet<String> =
Group::gather_user_organizations_full_access(user_uuid, conn).await.into_iter().collect();
diff --git a/src/api/core/emergency_access.rs b/src/api/core/emergency_access.rs
index 6bfe2395..f5cc6a6e 100644
--- a/src/api/core/emergency_access.rs
+++ b/src/api/core/emergency_access.rs
@@ -319,7 +319,7 @@ async fn accept_invite(emer_id: &str, data: JsonUpcase<AcceptData>, headers: Hea
let claims = decode_emergency_access_invite(token)?;
// This can happen if the user who received the invite used a different email to signup.
- // Since we do not know if this is intented, we error out here and do nothing with the invite.
+ // Since we do not know if this is intended, we error out here and do nothing with the invite.
if claims.email != headers.user.email {
err!("Claim email does not match current users email")
}
diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs
index 40490833..386a9a6d 100644
--- a/src/api/core/organizations.rs
+++ b/src/api/core/organizations.rs
@@ -1520,9 +1520,9 @@ async fn bulk_public_keys(
let data: OrgBulkIds = data.into_inner().data;
let mut bulk_response = Vec::new();
- // Check all received UserOrg UUID's and find the matching User to retreive the public-key.
+ // Check all received UserOrg UUID's and find the matching User to retrieve the public-key.
// If the user does not exists, just ignore it, and do not return any information regarding that UserOrg UUID.
- // The web-vault will then ignore that user for the folowing steps.
+ // The web-vault will then ignore that user for the following steps.
for user_org_id in data.Ids {
match UserOrganization::find_by_uuid_and_org(&user_org_id, org_id, &mut conn).await {
Some(user_org) => match User::find_by_uuid(&user_org.user_uuid, &mut conn).await {
@@ -1882,7 +1882,7 @@ async fn import(org_id: &str, data: JsonUpcase<OrgImportData>, headers: Headers,
// This means that this endpoint can end up removing users that were added manually by an admin,
// as opposed to upstream which only removes auto-imported users.
- // User needs to be admin or owner to use the Directry Connector
+ // User needs to be admin or owner to use the Directory Connector
match UserOrganization::find_by_user_and_org(&headers.user.uuid, org_id, &mut conn).await {
Some(user_org) if user_org.atype >= UserOrgType::Admin => { /* Okay, nothing to do */ }
Some(_) => err!("User has insufficient permissions to use Directory Connector"),
@@ -2897,7 +2897,7 @@ async fn put_reset_password_enrollment(
// This is a new function active since the v2022.9.x clients.
// It combines the previous two calls done before.
-// We call those two functions here and combine them our selfs.
+// We call those two functions here and combine them our selves.
//
// NOTE: It seems clients can't handle uppercase-first keys!!
// We need to convert all keys so they have the first character to be a lowercase.
diff --git a/src/api/core/two_factor/authenticator.rs b/src/api/core/two_factor/authenticator.rs
index 37221df1..18740454 100644
--- a/src/api/core/two_factor/authenticator.rs
+++ b/src/api/core/two_factor/authenticator.rs
@@ -177,7 +177,7 @@ pub async fn validate_totp_code(
}
}
- // Else no valide code received, deny access
+ // Else no valid code received, deny access
err!(
format!("Invalid TOTP code! Server time: {} IP: {}", current_time.format("%F %T UTC"), ip.ip),
ErrorEvent {