Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
409f4c46
Commit
409f4c46
authored
Oct 10, 2013
by
Leigh B Stoller
Committed by
Gary Wong
Jan 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up cookie handling for virtual host, and use insecure
flag until we have our new certificate.
parent
10e0f8d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
www/aptui/quickvm.php
www/aptui/quickvm.php
+18
-2
No files found.
www/aptui/quickvm.php
View file @
409f4c46
...
...
@@ -417,11 +417,27 @@ if (! $creator) {
SPITFOOTER
();
return
;
}
#
# Remember the user and auth key so that we can verify.
#
# The cookie handling is a pain since we run this under the aptlab
# virtual host, but the config uses a different domain, and so the
# cookies do not work. So, we have to look at our SERVER_NAME and
# set the cookie appropriately.
#
if
(
stristr
(
$_SERVER
[
"SERVER_NAME"
],
$TBAUTHDOMAIN
))
{
$cookiedomain
=
$TBAUTHDOMAIN
;
}
else
{
$cookiedomain
=
$_SERVER
[
"SERVER_NAME"
];
}
setcookie
(
"quickvm_user"
,
$creator
->
uuid
(),
0
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
$creator
->
uuid
(),
time
()
+
(
24
*
3600
*
30
),
"/"
,
$cookiedomain
,
0
);
setcookie
(
"quickvm_authkey"
,
$creator
->
auth_token
(),
0
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
$creator
->
auth_token
(),
time
()
+
(
24
*
3600
*
30
),
"/"
,
$cookiedomain
,
0
);
header
(
"Location: quickvm_status.php?uuid="
.
$quickvm
->
uuid
());
?>
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