Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
ce2d54c9
Commit
ce2d54c9
authored
Jan 17, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #86: correctly decode cookie
parent
d45576df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
REST.pm
PVE/REST.pm
+8
-1
changelog.Debian
debian/changelog.Debian
+2
-0
Workspace.js
www/manager/Workspace.js
+2
-1
No files found.
PVE/REST.pm
View file @
ce2d54c9
...
...
@@ -18,6 +18,7 @@ use HTML::Entities;
use
PVE::
JSONSchema
;
use
PVE::
AccessControl
;
use
PVE::
RPCEnvironment
;
use
URI::
Escape
;
use
Data::
Dumper
;
# fixme: remove
...
...
@@ -44,7 +45,13 @@ sub extract_auth_cookie {
return
undef
if
!
$cookie
;
return
(
$cookie
=~
/(?:^|\s)$cookie_name=([^;]*)/
)[
0
];
my
$ticket
=
(
$cookie
=~
/(?:^|\s)$cookie_name=([^;]*)/
)[
0
];
if
(
$ticket
&&
$ticket
=~
m/^PVE%3A/
)
{
$ticket
=
uri_unescape
(
$ticket
);
}
return
$ticket
;
}
sub
create_auth_cookie
{
...
...
debian/changelog.Debian
View file @
ce2d54c9
...
...
@@ -2,6 +2,8 @@ pve-manager (2.0-20) unstable; urgency=low
* fix bug #85: allow root@pam to generate tickets for other users
* fix bug #86: correctly decode cookie
-- Proxmox Support Team <support@proxmox.com> Tue, 17 Jan 2012 06:36:23 +0100
pve-manager (2.0-19) unstable; urgency=low
...
...
www/manager/Workspace.js
View file @
ce2d54c9
...
...
@@ -26,6 +26,8 @@ Ext.define('PVE.Workspace', {
me
.
loginData
=
loginData
;
PVE
.
CSRFPreventionToken
=
loginData
.
CSRFPreventionToken
;
PVE
.
UserName
=
loginData
.
username
;
var
expire
=
Ext
.
Date
.
add
(
new
Date
(),
Ext
.
Date
.
HOUR
,
2
);
Ext
.
util
.
Cookies
.
set
(
'
PVEAuthCookie
'
,
loginData
.
ticket
,
expire
);
me
.
onLogin
(
loginData
);
},
...
...
@@ -88,7 +90,6 @@ Ext.define('PVE.Workspace', {
url
:
'
/api2/json/access/ticket
'
,
method
:
'
POST
'
,
success
:
function
(
response
,
opts
)
{
// cookie is automatically updated
var
obj
=
Ext
.
decode
(
response
.
responseText
);
me
.
updateLoginData
(
obj
.
data
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment