diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-11 01:19:51 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-11 01:19:51 +0100 |
commit | 36d7fb2790774c53415c96f8c6955be42bad952f (patch) | |
tree | 4481dac53a6d0896e90ff72b9b68665e59e159db /server/src/federation.rs | |
parent | 767d6c4c7b8518198b0343781128027051b94ae5 (diff) | |
download | jellything-36d7fb2790774c53415c96f8c6955be42bad952f.tar jellything-36d7fb2790774c53415c96f8c6955be42bad952f.tar.bz2 jellything-36d7fb2790774c53415c96f8c6955be42bad952f.tar.zst |
(partially) fix security problem with federated session
Diffstat (limited to 'server/src/federation.rs')
-rw-r--r-- | server/src/federation.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server/src/federation.rs b/server/src/federation.rs index 38863e2..eb2a1ac 100644 --- a/server/src/federation.rs +++ b/server/src/federation.rs @@ -5,8 +5,8 @@ */ use anyhow::anyhow; use jellybase::CONF; -use jellyclient::{Instance, Session}; -use std::{collections::HashMap, sync::Arc, time::Duration}; +use jellyclient::{Instance, LoginDetails, Session}; +use std::{collections::HashMap, sync::Arc}; use tokio::sync::RwLock; pub struct Federation { @@ -46,11 +46,12 @@ impl Federation { let s = Arc::new( self.get_instance(host)? .to_owned() - .login( - username.to_owned(), - password.to_owned(), - Duration::from_secs(60 * 60 * 24 * 356), - ) + .login(LoginDetails { + username: username.to_owned(), + password: password.to_owned(), + expire: None, + drop_permissions: None, + }) .await?, ); w.insert(host.to_owned(), s.clone()); |