diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-06-06 21:37:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-06-06 21:37:11 +0000 |
commit | aa38097c07def6d31481dfeeb2bcba520d323b2d (patch) | |
tree | d3c3d07dbd2886af2d38b1a4d175be32b4d0219c /modules/statistics | |
parent | 47ba929ce28e5bbc1d1aa3961da8bb08a8cb11f3 (diff) | |
download | brdo-aa38097c07def6d31481dfeeb2bcba520d323b2d.tar.gz brdo-aa38097c07def6d31481dfeeb2bcba520d323b2d.tar.bz2 |
- Dropped check_input(); use check_query() instead.
- Made the statistics module use referer_uri() for security's sake.
Diffstat (limited to 'modules/statistics')
-rw-r--r-- | modules/statistics/statistics.module | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 3b8d7d8ca..294b67135 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -53,7 +53,7 @@ function statistics_exit() { if ((variable_get("statistics_enable_access_log", 0)) && (throttle_status() < 5)) { // statistical logs are enabled - $referrer = getenv("HTTP_REFERER"); + $referrer = referer_uri(); $hostname = getenv("REMOTE_ADDR"); // log this page access if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) { @@ -333,11 +333,11 @@ function statistics_recent_refer() { $query = "SELECT url,timestamp FROM accesslog WHERE url <> '' ORDER BY timestamp DESC"; } elseif ($view == "internal") { - $query = "SELECT url,timestamp FROM accesslog WHERE url LIKE '%". check_input($_SERVER["HTTP_HOST"]) ."%' ORDER BY timestamp DESC"; + $query = "SELECT url,timestamp FROM accesslog WHERE url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' ORDER BY timestamp DESC"; $describe = "internal "; } else { - $query = "SELECT url,timestamp FROM accesslog WHERE url NOT LIKE '%". check_input($_SERVER["HTTP_HOST"]) ."%' AND url <> '' ORDER BY timestamp DESC"; + $query = "SELECT url,timestamp FROM accesslog WHERE url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' AND url <> '' ORDER BY timestamp DESC"; $describe = "external "; } @@ -363,12 +363,12 @@ function statistics_top_refer() { $query = "SELECT url, COUNT(url) AS count FROM accesslog WHERE url <> '' GROUP BY url ORDER BY count DESC"; } elseif ($view == "internal") { - $query = "SELECT url, COUNT(url) AS count FROM accesslog WHERE url LIKE '%". check_input($_SERVER["HTTP_HOST"]) ."%' GROUP BY url ORDER BY count DESC"; + $query = "SELECT url, COUNT(url) AS count FROM accesslog WHERE url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' GROUP BY url ORDER BY count DESC"; $describe = "internal "; } else { /* default to external */ - $query = "SELECT url, COUNT(url) AS count FROM accesslog WHERE url NOT LIKE '%". check_input($_SERVER["HTTP_HOST"]) ."%' AND url <> '' GROUP BY url ORDER BY count DESC"; + $query = "SELECT url, COUNT(url) AS count FROM accesslog WHERE url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' AND url <> '' GROUP BY url ORDER BY count DESC"; $describe = "external "; } |