| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Show debug console for certain IP's only | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
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:
and replace with Code:
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 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
Perhaps this feature should be added to the SECURITY_BLOCK_UNKNOWN_ADMIN_IP functionality defined here .
That way - the concept of having having approved ip's for administrators could be managed from the same functionality that already exists. ----
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
That could be yes, or maybe this
$admin_allowed_ip = ""; from config.php can be used. I just had to put something together real fast on a live site.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
I thought it only opened it for the admin user! I can't believe this is open to any visitor, crazy!
I don't have a dedicated IP at home where I do a lot of modding, so is there a way I can limit this to a logged in admin user? I'd appreciate any help.
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
Not sure if userinfo is available in init.php. You can try $login == "your login" or $userinfo["login"] == "your login" or $userinfo["username"] == "your login".
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
I used $userinfo["username"] == "your login" and it seems to be fine, i could use webmaster on my desktop, but if i went to the site from my laptop (not logged in) it didn't appear.
ideally it should save the user than enables it and only show it for that user? as there's only me it doesn't matter
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
Just to be clear - the issue is not with Webmaster Mode, but with the debug console option - correct?
Also - I'm curious if there is a reason you use the debug console instead of WebMaster mode? I never use it, so I am wondering what feature I am missing .... ------- ----
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
I think the issue is in both. It is almost the same but the debug console will not underline everything on the page so the page looks normal and you can browse and click without worrying the edit window will popup and you cannot messup anything
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#9
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
I'm not able to verify that webmaster mode opens for anything other than the session you are in when you call it. (I didn't check many versions) My habit has always been to open webmaster mode in FF, and at the same time have another browser, like a less forgiving IE7, open at the same time to look at changes. I've never seen this problem over the years and versions, so I don't believe it happens with webmaster mode.
The debug console option, on the other hand, has the issue you report. That is one of the reasons I never check that box. I understand now why you want the debug console to work properly and not simply use webmaster mode. So it is like webmaster mode except no identification of language variables and no mouse-over/border effects for template tracing? I don't use webmaster mode for editing anything - but I am so used to how it is, that the language variable links and other stuff don't phase me. Thanks for the information. ----
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#10
|
|||||||||
|
|||||||||
Re: Show debug console for certain IP's only
Maybe WM mode doesn;t do it - I just don't use it as I have pretty good understanding what's where in xcart template system. I was just suprised that something called "debug console" is visible to all when turned on
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|