From 352821346066b766ee1685b3c247ba4f16b9f606 Mon Sep 17 00:00:00 2001 From: Maurus Decimus <11444311+mdecimus@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:40:42 +0200 Subject: [PATCH] App Passwords now begin with `app_` instead of `app ` --- CHANGELOG.md | 1 + crates/common/src/auth/credential.rs | 4 ++-- crates/services/src/task_manager/mod.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cd4e45..4476f9ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If ## Changed - Replaced `STALWART_HTTPS_PORT` with `STALWART_PUBLIC_URL`. +- App Passwords now begin with `app_` instead of `app ` to avoid issues with some clients that do not support spaces in passwords. ## Fixed - Directory: diff --git a/crates/common/src/auth/credential.rs b/crates/common/src/auth/credential.rs index 185da748..8f436980 100644 --- a/crates/common/src/auth/credential.rs +++ b/crates/common/src/auth/credential.rs @@ -60,7 +60,7 @@ impl AppPassword { } pub fn parse(token: &str) -> Option { - let token = token.strip_prefix("app ")?; + let token = token.strip_prefix("app_")?; let mut reader = Base32Reader::new(token.as_bytes()); let mut credential_id = [0u8; 4]; let mut secret = [0u8; 18]; @@ -85,7 +85,7 @@ impl AppPassword { pub fn build(&self) -> String { let mut writer = Base32Writer::with_capacity(std::mem::size_of::().div_ceil(5) * 8); - writer.push_string("app "); + writer.push_string("app_"); let _ = writer.write(&self.credential_id.to_be_bytes()); let _ = writer.write_all(&self.secret); writer.finalize() diff --git a/crates/services/src/task_manager/mod.rs b/crates/services/src/task_manager/mod.rs index 690a291d..17a0187f 100644 --- a/crates/services/src/task_manager/mod.rs +++ b/crates/services/src/task_manager/mod.rs @@ -10,8 +10,8 @@ use registry::schema::structs::Task; use registry::types::EnumImpl; use std::future::Future; use std::time::Instant; +use store::ahash::AHashMap; use store::write::Operation; -use store::{ahash::AHashMap, write::now}; use tokio::sync::mpsc; use trc::TaskManagerEvent;