diff options
author | Dima Panov <fluffy@FreeBSD.org> | 2021-02-01 15:06:38 +0000 |
---|---|---|
committer | Dima Panov <fluffy@FreeBSD.org> | 2021-02-01 15:06:38 +0000 |
commit | 955bc6ff4676f9d6c122e98f2396b14e6687b07c (patch) | |
tree | ab9b8acae45040788bf05a53ceaf37ee3bdbed94 | |
parent | dns/inadyn: update to the 2.8.1 (diff) |
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
Notes
Notes:
svn path=/head/; revision=563582
-rw-r--r-- | www/phpvirtualbox/Makefile | 1 | ||||
-rw-r--r-- | www/phpvirtualbox/files/patch-js_utils.js | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/www/phpvirtualbox/Makefile b/www/phpvirtualbox/Makefile index 25858b96450b..9dcef42b8562 100644 --- a/www/phpvirtualbox/Makefile +++ b/www/phpvirtualbox/Makefile @@ -3,6 +3,7 @@ PORTNAME= phpvirtualbox DISTVERSION= 5.2-1 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= vbox@FreeBSD.org diff --git a/www/phpvirtualbox/files/patch-js_utils.js b/www/phpvirtualbox/files/patch-js_utils.js new file mode 100644 index 000000000000..27d0c04fbf45 --- /dev/null +++ b/www/phpvirtualbox/files/patch-js_utils.js @@ -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; + } |