You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the doku text is parsed, a cachefilename is computed based on the md5 sum of the graph parametres, and the img URL that contains the parametres is created. When the browser later GETs the image, the farming rewriting rules add the animal=foo parametre to the URL parametre list. Graphviz plugin then computes the md5 out of the parametre list, which just happens to be different from the initial parametre list. Cache file has a different name, is not found; user gets the error image :-(.
This simple patch filters out any unexpected GET parameters in the _imgfile function, making the plugin compatible with the farming technique.
diff -Naur syntax.php.orig syntax.php --- syntax.php.orig 2013-04-03 05:41:13.111977071 +0200+++ syntax.php 2013-04-03 06:08:48.652007895 +0200@@ -119,6 +119,8 @@
* Return path to the rendered image on our local system
*/
function _imgfile($data){
+ // filter out unwanted GET parametres+ $data=array_intersect_key( $data, array( 'width' => 1, 'height' => 1, 'layout' => 1, 'align' => 1, 'version' => 1, 'md5' => 1 ));
$cache = $this->_cachename($data,'png');
// create the file if needed
/Schplurtz
The text was updated successfully, but these errors were encountered:
I did not test anything, but, in june 2022, the animal parameter has been removed from the query string in both DW core and the farmer plugin. So for anyone running DW release Igor or newer, or using a recent version of the farmer plugin, there is no problem anymore.
Hi,
This plugins in not compatible with farming techniques described in https://www.dokuwiki.org/farms#b_htaccess_based_setup . This technique adds an HTTP GET parametre.
When the doku text is parsed, a cachefilename is computed based on the md5 sum of the graph parametres, and the img URL that contains the parametres is created. When the browser later GETs the image, the farming rewriting rules add the animal=foo parametre to the URL parametre list. Graphviz plugin then computes the md5 out of the parametre list, which just happens to be different from the initial parametre list. Cache file has a different name, is not found; user gets the error image :-(.
This simple patch filters out any unexpected GET parameters in the
_imgfile
function, making the plugin compatible with the farming technique./Schplurtz
The text was updated successfully, but these errors were encountered: