App Passwords now begin with app_ instead of app

This commit is contained in:
Maurus Decimus
2026-04-30 17:40:42 +02:00
parent a46132e410
commit 3528213460
3 changed files with 4 additions and 3 deletions

View File

@@ -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:

View File

@@ -60,7 +60,7 @@ impl AppPassword {
}
pub fn parse(token: &str) -> Option<Self> {
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::<Self>().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()

View File

@@ -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;