Index: openacs-4/packages/xotcl-request-monitor/www/ip-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/ip-info.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/xotcl-request-monitor/www/ip-info.tcl 29 Jun 2018 17:27:19 -0000 1.4 +++ openacs-4/packages/xotcl-request-monitor/www/ip-info.tcl 3 Sep 2024 15:37:54 -0000 1.5 @@ -1,11 +1,11 @@ ad_page_contract { - Displays information about an ip address + Displays information about an IP address @author Gustaf Neumann @cvs-id $Id$ } -query { - {ip} + {ip:token} } -properties { title:onevalue context:onevalue @@ -14,9 +14,18 @@ set title "IP Lookup" set context [list $title] -if {[catch {set dns_name [ns_hostbyaddr $ip]}]} { set dns_name "DNS lookup for $ip failed" } +set admin_p [acs_user::site_wide_admin_p] +if {!$admin_p} { + ad_return_warning "Insufficient Permissions" \ + "Only side wide admins are allowed to view this page!" + ad_script_abort +} +if {[catch {set dns_name [ns_hostbyaddr $ip]}]} { + set dns_name "DNS lookup for $ip failed" +} + # Local variables: # mode: tcl # tcl-indent-level: 2