diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-04-07 12:43:02 -0700 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-04-07 12:43:02 -0700 |
commit | 892345cb7ab86c179f6cc30b504789133d354175 (patch) | |
tree | e8f498fe6c2a41acccf4c958a69c60aecad72142 /inc/common.php | |
parent | f20dba3663b5307c29d9c535843b51157b540ef1 (diff) | |
parent | 3e8bad3a1f8b5d065e170bb12dd224bf18de6897 (diff) | |
download | rpg-892345cb7ab86c179f6cc30b504789133d354175.tar.gz rpg-892345cb7ab86c179f6cc30b504789133d354175.tar.bz2 |
Merge pull request #203 from splitbrain/fetchissues3
prevent third-party requests from using fetch
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php index 471eb91b5..27f90b53b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -436,6 +436,10 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; if(is_array($more)) { + // add token for resized images + if($more['w'] || $more['h']){ + $more['tok'] = media_get_token($id,$more['w'],$more['h']); + } // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); if(!$more['w']) unset($more['w']); |