aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/functions.inc.php (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New config for "allowed" graphs, so people can hide some of them.onefang2019-12-101-0/+6
|
* functions.inc.php: escape minus in regexJulian Brost2018-12-091-1/+1
| | | | | | | | This makes CGP work on PHP 7.3 as it otherwise only shows an "Unknown host" error message and logs the following PHP warning: PHP Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in .../inc/functions.inc.php on line 37
* inc/functions: check if $_GET value is empty before executing preg_matchPim van den Berg2016-12-091-1/+1
| | | | | | | | When using "canvas" mode, a lot of these errors were thrown: > Invalid type instance in $_GET["ti"]: "" > Invalid type instance in $_GET["pi"]: "" Closes: #132
* inc/functions: a host, pi and ti may contain colons (:) and spaces ( )Pim van den Berg2015-07-041-1/+1
| | | | For example: "CPU Interface : 1" (snmp plugin + hp1810g switch)
* inc/functions: a plugin/type instance may contain a dotPim van den Berg2015-06-221-7/+2
| | | | Closes #123
* inc/functions: merge functions GET and validate_getPim van den Berg2015-05-251-10/+48
| | | | And make sure all input from $_GET variables are parsed and validated.
* inc/functions: make type argument of validate_get function exactly the same ↵Pim van den Berg2015-05-251-6/+6
| | | | as $_GET value
* Revert "make detail page accessible when using "canvas" graph_type"Peter Wu2014-12-141-10/+0
| | | | | | | This reverts commit 82d88098f4203cf7402d4faf5ad100cada70efaf. Breaks async rendering, see https://github.com/pommi/CGP/issues/106#issuecomment-66896905
* make detail page accessible when using "canvas" graph_typePim van den Berg2014-11-111-0/+10
| | | | Closes #106
* Remove from all files the ending php tagFrançois LASSERRE2014-07-231-2/+0
|
* Better x and y validation, report 400 on errorsPeter Wu2014-07-211-1/+1
| | | | | | | | | Report 400 Bad Request on query errors instead of reporting 200 OK (which can be cached). Add some additional validation for the 'x' and 'y' parameters, to catch underflow (test with `x=-10` for example). Also fix a typo in the error message and include more details (the actual error).
* Fix overly permissive hostname validation, fix host checkPeter Wu2014-07-211-2/+2
| | | | | | | | | `[\w\W]` matches EVERYTHING. Validation failed. Also remove `\d` as that `\w` is a superset of it. Also check that the host parameter is actually non-empty, otherwise `collectd_plugins` will happily return results as the directory `$CONFIG['datadir'] . '/' . ''` trivially exists...
* inc/functions.inc.php: rm trailing slash in base and resolve symlinkPim van den Berg2014-03-231-0/+5
| | | | | | | When there was a symlink in the path of $base, strpos($realpath, $base) would have always return false. Closes: https://github.com/pommi/CGP/pull/49
* integrate jsrrdgraph in CGPPim van den Berg2013-05-181-0/+15
|
* add support for varnish plugin categoriesPim van den Berg2012-09-071-0/+1
| | | | | | | | | | | | | | | Since commit collectd-4.10.0-88-g02e12db the varnish plugin groups collected values in categories. The collectd filestructure used for varnish is now: <plugin>-<category>-<plugin_instance>/<type>-<type_instance> Because this isn't distinguishable from a regular plugin like df, ... df-var-tmp/df_complex-free.rrd ("var" isn't the category here) ... the category is only set with the varnish plugin. Reported-by: Jonathan Huot <jonathan.huot@gmail.com>
* resolve php noticesKarol Nowacki2011-04-211-0/+6
| | | | Including a lot of undefined $_GET values.
* remove php gd dependencyPim van den Berg2010-06-051-0/+6
| | | | | | Image error messages were shown using PHP GD. People who haven't installed PHP GD don't understand what is going on when an image is not shown. It is replaced by a static image referring to the error log for more information.
* make rrdfiles using utf8 and spaces workJakob Haufe2010-02-161-3/+6
|
* better validation of possible user input (get)Pim van den Berg2010-01-011-0/+27