App Passwords now begin with app_ instead of app
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user