diff options
author | Yorhel <git@yorhel.nl> | 2010-11-02 18:47:15 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-02 18:48:22 +0100 |
commit | d6cbbc9025ccffae5ec590c692676ac944775eb0 (patch) | |
tree | 792c7cb40c02158f278148b0a46ba8ca06ce8a8b /data | |
parent | 5d44709dd98c97cb8ef9a59340990a5ecf8f62db (diff) |
Prefix all cookies with a configurable cookie_prefix
This replaces the "cookie_auth" setting, and applies to all cookies in
use by VNDB.
Diffstat (limited to 'data')
-rw-r--r-- | data/global.pl | 2 | ||||
-rw-r--r-- | data/script.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/data/global.pl b/data/global.pl index 45c8f6b5..4046ce10 100644 --- a/data/global.pl +++ b/data/global.pl @@ -19,7 +19,7 @@ our %S = (%S, url_static => 'http://s.vndb.org', skin_default => 'angel', cookie_domain => '.vndb.org', - cookie_auth => 'vndb_auth', + cookie_prefix => 'vndb_', global_salt => 'any-private-string-here', source_url => 'http://git.blicky.net/vndb.git/?h=master', admin_email => 'contact@vndb.org', diff --git a/data/script.js b/data/script.js index 12569d25..3e2b479f 100644 --- a/data/script.js +++ b/data/script.js @@ -41,10 +41,11 @@ function ajax(url, func) { function setCookie(n,v) { var date = new Date(); date.setTime(date.getTime()+(365*24*60*60*1000)); - document.cookie = n+'='+v+'; expires='+date.toGMTString()+'; path=/'; + document.cookie = cookie_prefix+n+'='+v+'; expires='+date.toGMTString()+'; path=/'; } function getCookie(n) { var l = document.cookie.split(';'); + n = cookie_prefix+n; for(var i=0; i<l.length; i++) { var c = l[i]; while(c.charAt(0) == ' ') |