tags 670811 + pending

On Montag, 30. April 2012, Munin SVN Repository Admin wrote:
> Author: steve.schnepp
> Date: 2012-04-30 15:14:18 +0200 (Mon, 30 Apr 2012)
> New Revision: 4829
> 
> Modified:
>    trunk/common/lib/Munin/Common/Config.pm
>    trunk/master/_bin/munin-cgi-graph.in
> Log:
> - add a max setting for cgi image size. (D: Closes #670811)
> 
> 
> Modified: trunk/common/lib/Munin/Common/Config.pm
> ===================================================================
> --- trunk/common/lib/Munin/Common/Config.pm   2012-04-27 16:18:16 UTC (rev
> 4828) +++ trunk/common/lib/Munin/Common/Config.pm     2012-04-30 13:14:18 
UTC
> (rev 4829) @@ -39,6 +39,7 @@
>       "unknown_limit", "num_unknowns", "dropdownlimit",
>       "max_graph_jobs", "max_cgi_graph_jobs", "munin_cgi_graph_jobs",
>       "max_html_jobs", "cgitmpdir", "update_rate",
> +     "max_size_x", "max_size_y",
>       "staticdir", "html_strategy",
>       "rrdcached_socket", "graph_args_after",
>      "graph_future", "trend", "predict",
> 
> Modified: trunk/master/_bin/munin-cgi-graph.in
> ===================================================================
> --- trunk/master/_bin/munin-cgi-graph.in      2012-04-27 16:18:16 UTC (rev 
4828)
> +++ trunk/master/_bin/munin-cgi-graph.in      2012-04-30 13:14:18 UTC (rev 
4829)
> @@ -355,6 +355,23 @@
>           return 0;
>       }
>      }
> +
> +    # Checks the image size requested.
> +    if (( CGI::param("size_x") || "") =~ m/^(\d+)/) {
> +     my $max_size_x = ( $config->{max_size_x} || 4000);
> +     if ($1 > $max_size_x) {
> +             WARN "[WARNING] Asked image size x too large : $1 > 
$max_size_x. Bailing
> out."; +              return 0;
> +     }
> +    }
> +    if (( CGI::param("size_y") || "") =~ m/^(\d+)/) {
> +     my $max_size_y = ($config->{max_size_y} || 4000);
> +     if ($1 > $max_size_y) {
> +             WARN "[WARNING] Asked image size y too large : $1 > 
$max_size_y. Bailing
> out."; +              return 0;
> +     }
> +    }
> +
>      return 1;
>  }
> 
> 
> 
> ---------------------------------------------------------------------------
> --- Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Munin-commits mailing list
> munin-comm...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/munin-commits




-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to