]> git.proxmox.com Git - proxmox-backup.git/commitdiff
Utils.js: fix cookie handling
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 31 Jan 2019 09:08:08 +0000 (10:08 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 31 Jan 2019 09:08:08 +0000 (10:08 +0100)
Use unsecure cookie foör testing.

src/server/rest.rs
www/Utils.js

index 1a7831ccf535e609d54d5807c1929a68f6261177..d9263778f1347dc5cae35ef985877e01771c8e77 100644 (file)
@@ -295,8 +295,6 @@ fn get_index() ->  BoxFut {
     let resp = Response::builder()
         .status(StatusCode::OK)
         .header(header::CONTENT_TYPE, "text/html")
-        // emulate succssful login, so that Proxmox:Utils.authOk() returns true
-        .header(header::SET_COOKIE, "PBSAuthCookie=\"XXX\"") // fixme: remove
         .body(index.into())
         .unwrap();
 
index 258136a10d5c24e873bd63fb270772e2e1d3e059..cbd53122921f7d9a3bb0a4795e4ad2d0389b1bda 100644 (file)
@@ -9,7 +9,10 @@ Ext.define('PBS.Utils', {
     updateLoginData: function(data) {
        Proxmox.CSRFPreventionToken = data.CSRFPreventionToken;
        Proxmox.UserName = data.username;
-       Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
+       console.log(data.ticket);
+       // fixme: use secure flag once we have TLS
+       //Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
+       Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, false);
     },
 
     constructor: function() {