Commit 6908c07f authored by Dries's avatar Dries
Browse files

- Patch #1684976 by droplet, timmillwood: Better validation for statistics.php.

parent 4b2dfc3a
......@@ -17,8 +17,8 @@
drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
if (config('statistics.settings')->get('count_content_views')) {
$nid = $_POST['nid'];
if (is_numeric($nid)) {
$nid = filter_input(INPUT_POST, 'nid', FILTER_VALIDATE_INT);
if ($nid) {
db_merge('node_counter')
->key(array('nid' => $nid))
->fields(array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment