mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-30 02:09:25 +00:00
src/client/http_client.rs: try to login
use an environment var to store passphrase (PBS_PASSWORD)
This commit is contained in:
parent
fe3b25029b
commit
50ff21da59
@ -458,6 +458,8 @@ pub fn handle_request(api: Arc<ApiConfig>, req: Request<Body>) -> BoxFut {
|
||||
if let Some(_username) = rpcenv.get_user() {
|
||||
// fixme: check permissions
|
||||
} else {
|
||||
println!("Abort UNAUTHORIZED API REQUEST");
|
||||
|
||||
// always delay unauthorized calls by 3 seconds (from start of request)
|
||||
let resp = (formatter.format_error)(http_err!(UNAUTHORIZED, "permission check failed.".into()));
|
||||
let delayed_response = tokio::timer::Delay::new(delay_unauth_time)
|
||||
|
Loading…
Reference in New Issue
Block a user