]> git.proxmox.com Git - proxmox-backup.git/commit - src/client/http_client.rs
fix #3038: check user before renewing ticket
authorDylan Whyte <d.whyte@proxmox.com>
Tue, 20 Oct 2020 09:29:16 +0000 (11:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Oct 2020 06:34:30 +0000 (08:34 +0200)
commitafef7f3bbaca62e9f9a3fdb5329462eb78fd903b
tree2dc0b0d64c0bf6a69a7c3ff228174f6b135f1401
parentb428af978154c2659de987b99e72998778e457ee
fix #3038: check user before renewing ticket

Fixes a bug in which the userid of the ticket cache is updated,
when a user connects, but the ticket itself is not.
This means a newly connected user has a previously connected
user's ticket and thus, cannot do anything, as the client will
attempt to use the invalid ticket.

e.g. if john@pbs connected to the server first, followed by
mike@pbs, the following would be stored in the ticket cache.

{
  "localhost": {
    "mike@pbs": {
      "ticket": "PBS:john@pbs:AAAA",
      "timestamp": 1601039326,
      "token": "BBBB"
    }
  }
}

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
src/client/http_client.rs