openbsd-ports/net/php-weathermap/patches/patch-lib_datasources_WeatherMapDataSource_mrtg_php
sthen 69acda4c73 update to php-weathermap 0.97c; various fixes including SECURITY fixes
to improve input validation in the editor (which is not enabled by default)
2013-04-22 14:05:07 +00:00

16 lines
743 B
Plaintext

$OpenBSD: patch-lib_datasources_WeatherMapDataSource_mrtg_php,v 1.2 2013/04/22 14:05:07 sthen Exp $
Allow larger headers when scraping bandwidth data from mrtg pages
--- lib/datasources/WeatherMapDataSource_mrtg.php.orig Fri Mar 22 09:26:41 2013
+++ lib/datasources/WeatherMapDataSource_mrtg.php Mon Apr 22 14:32:24 2013
@@ -38,7 +38,7 @@ class WeatherMapDataSource_mrtg extends WeatherMapData
{
while (!feof($fd))
{
- $buffer=fgets($fd, 4096);
+ $buffer=fgets($fd, 16384);
wm_debug("MRTG ReadData: Matching on '${matchvalue}in $matchperiod' and '${matchvalue}out $matchperiod'\n");
if (preg_match("/<\!-- ${matchvalue}in $matchperiod ([-+]?\d+\.?\d*) -->/", $buffer, $matches)) { $data[IN] = $matches[1] * 8; }