View Single Post
  #1  
Old 11-06-2010, 03:43 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Show debug console for certain IP's only

This should be a standard future in xcart but it's not. Every time you turn on the debug console anyone visiting the site can see it and gather data fom your site. I've seen so many open stores with the console on. Maybe QT will get this and put it in admin as a setting in future releases. So here it is:

Open init.php and find
Code:
if($config["General"]["enable_debug_console"]=="Y" || $editor_mode=='editor') $smarty->debugging=true;

and replace with
Code:
# added by CFL Systems # use this format to add ip addresses to the list # $ips_array = array('xxx.xxx.xxx.xxx','xxx.xxx.xxx.xxx'); $ips_array = array('the_ip_you_want_to_use_see_above_for_example'); $my_ip = $_SERVER['REMOTE_ADDR']; # modified by CFL Systems to include IP address if(in_array($my_ip,$ips_array) && ($config["General"]["enable_debug_console"]=="Y" || $editor_mode=='editor')) $smarty->debugging=true;

This will show the console only to IP's from the list so you can have it on if you need to and make sure no one else can see it.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote