mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
www/phpvirtualbox: Set default cookie expiry date to 7 days after creation
Fix the issue "unable to switch servers" A few weeks ago phpVirtualBox started preventing users to switch from one server to another, as you can read in this upstream bug report: https://github.com/phpvirtualbox/phpvirtualbox/issues/267 PR: 253155 Submitted by: andrew.hotlab With hat: ports-secteam Obtained from: phpvirtualbox repo MFH: 2021Q1
This commit is contained in:
parent
f94aec112a
commit
955bc6ff46
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=563582
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= phpvirtualbox
|
||||
DISTVERSION= 5.2-1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www
|
||||
|
||||
MAINTAINER= vbox@FreeBSD.org
|
||||
|
11
www/phpvirtualbox/files/patch-js_utils.js
Normal file
11
www/phpvirtualbox/files/patch-js_utils.js
Normal file
@ -0,0 +1,11 @@
|
||||
--- js/utils.js.orig 2018-11-09 09:43:10 UTC
|
||||
+++ js/utils.js
|
||||
@@ -1112,7 +1112,7 @@ function phpVirtualBoxFailure(msg) {
|
||||
* @param {Date} expire - when cookie should expire
|
||||
*/
|
||||
function vboxSetCookie(k,v,expire) {
|
||||
- var exp = (v ? (expire ? expire : new Date(2020,12,24)) : new Date().setDate(new Date().getDate() - 1));
|
||||
+ var exp = (v ? (expire ? expire : new Date(Date.now() + 7 * 1000 * 60 * 60 * 24)) : new Date().setDate(new Date().getDate() - 1));
|
||||
document.cookie = k+"="+v+"; expires="+exp.toGMTString()+"; path=/";
|
||||
$('#vboxPane').data('vboxCookies')[k] = v;
|
||||
}
|
Loading…
Reference in New Issue
Block a user