Ability to disable debugger permanently based on cookie

7 views
Skip to first unread message

Alexander Obuhovich

unread,
Apr 12, 2010, 1:06:36ā€ÆPM4/12/10
to In-Portal Development
Debugger in In-Portal is only enabled, when site visitor's IP address is listed in debug.php file. However this is not enough, when developers are using shared IP (for example during Network Address Translation usage) and one or more of the developers wants to disable debug mode for him only.

Also useful, when managers and developers of company, using In-Portal share the same IP address and managers don't want to be in debug mode at all.

I see this as "Disable Permanently"/"Disable" button in debugger toolbar. Once clicked user will be asked for confirmation and once confirmed there are two options:
  • disable debugger for entire domain - useful when multiple sites are developed on same domain (for manager)
  • disabled for entire site - useful for production sites
Since we will not ask user how what the area of disabling debugger, then only one should be used.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry Andrejev

unread,
Apr 12, 2010, 10:31:24ā€ÆPM4/12/10
to in-por...@googlegroups.com
This should very clever and useful.

I would call a new button as "Turn OFF".


DA.

Ilya Bernshteyn

unread,
Apr 13, 2010, 1:41:50ā€ÆAM4/13/10
to in-por...@googlegroups.com
This will be pretty convenient!Ā 

I'm a little confused with what this means:
  • disable debugger for entire domain - useful when multiple sites are developed on same domain (for manager)
  • disabled for entire site - useful for production sites
1) Bullet point 1 - in other words, dev.intechnic.com/site - disable for all dev.intechnic.com/sites or www.actual-site.com?

2) Bullet point 2 - how is this different from #2?

Ilya

Alexander Obuhovich

unread,
Apr 13, 2010, 3:43:13ā€ÆAM4/13/10
to in-por...@googlegroups.com
Bullet point 1 - disables for dev.intechnic.com/site1 and dev.intechnic.com/site2, even, when only used on dev.intechnic.com/site1
Bullet point 2 - only for current website/subfolder not others on same domain

Dmitry Andrejev

unread,
Apr 13, 2010, 11:37:09ā€ÆAM4/13/10
to in-por...@googlegroups.com
Ilya, is it clear now?

Alex, I have gave it a send thought - "Disable Debugger" option will work for everyone I think.

DA.

Dmitry Andrejev

unread,
Apr 17, 2010, 9:37:41ā€ÆPM4/17/10
to in-por...@googlegroups.com
Anyone else has questions?

Let's try to finalize this quickly and convert in a new task so it's not lost.

DA.

Phil -- wbtc.fr --

unread,
Apr 18, 2010, 4:38:52ā€ÆAM4/18/10
to in-por...@googlegroups.com
"Turn off" button in debugger toolbar seems a good solution, nothing to setup anywhere else.

Should you create a separate cookie called "in-portal_debug", to easily locate and delete it if needed?


2010/4/18 Dmitry Andrejev <dand...@gmail.com>

Dmitry Andrejev

unread,
Apr 19, 2010, 10:53:25ā€ÆPM4/19/10
to in-por...@googlegroups.com
Yes, Phil - it will set the cookie.

Alex, ready for a task?

DA.

Alexander Obuhovich

unread,
Apr 20, 2010, 3:52:22ā€ÆAM4/20/10
to in-por...@googlegroups.com
ok

Alexander Obuhovich

unread,
Apr 25, 2010, 9:41:52ā€ÆAM4/25/10
to in-por...@googlegroups.com

Alexander Obuhovich

unread,
Jul 1, 2011, 11:14:47ā€ÆAM7/1/11
to in-por...@googlegroups.com
Here is the patch. Ready for testing. Cookie is created with 1 year expiration.
turnoff_debugger_in_nat_environment.patch

Phil -- wbtc.fr --

unread,
Jul 1, 2011, 11:38:48ā€ÆAM7/1/11
to in-por...@googlegroups.com
cool. Another question I just though about this morning, because my usual internet connection is lost: could it also be used to permanently activate debug, without any specific IP address?


2011/7/1 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Jul 1, 2011, 11:45:33ā€ÆAM7/1/11
to in-por...@googlegroups.com
Then it will be security hole, since everyone who will set that cookie (that will be the same for all users) will be able to see debugger reports, that could disclose some secret information about website internals.

Phil -- wbtc.fr --

unread,
Jul 1, 2011, 12:31:15ā€ÆPM7/1/11
to in-por...@googlegroups.com
can't this cookie hold a security key? I've also thought about browser-based security, but it seems harder to recognize, isn't it?

2011/7/1 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Jul 1, 2011, 3:58:12ā€ÆPM7/1/11
to in-por...@googlegroups.com

Then we need to store all that keys somewhere, e.g. in new table. This doesn't look too good.

Better to use dyndns service and type your dyndns host instead of ip in debug.php. Then we can add hostname resolving during debug.php processing.

>>>>>>>>>>>>> - disable debugger for entire domain - useful when multiple

>>>>>>>>>>>>> sites are developed on same domain (for manager)
>>>>>>>>>>>>> - disabled for entire site - useful for production sites

>>>>>>>>>>>>>
>>>>>>>>>>>>> 1) Bullet point 1 - in other words, dev.intechnic.com/site -
>>>>>>>>>>>> disable for all dev.intechnic.com/sites or www.actual-site.com?
>>>>>>>>>>>>
>>>>>>>>>>>> 2) Bullet point 2 - how is this different from #2?
>>>>>>>>>>>>
>>>>>>>>>>>> Ilya
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 12, 2010 at 9:31 PM, Dmitry Andrejev <
>>>>>>>>>>>> dand...@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> This should very clever and useful.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I would call a new button as "Turn OFF".
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> DA.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 12, 2010 at 12:06 PM, Alexander Obuhovich <
>>>>>>>>>>>>> aik....@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Debugger in In-Portal is only enabled, when site visitor's IP
>>>>>>>>>>>>>> address is listed in debug.php file. However this is not enough, when
>>>>>>>>>>>>>> developers are using shared IP (for example during Network Address
>>>>>>>>>>>>>> Translation usage) and one or more of the developers wants to disable debug
>>>>>>>>>>>>>> mode for him only.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also useful, when managers and developers of company, using
>>>>>>>>>>>>>> In-Portal share the same IP address and managers don't want to be in debug
>>>>>>>>>>>>>> mode at all.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I see this as "Disable Permanently"/"Disable" button in
>>>>>>>>>>>>>> debugger toolbar. Once clicked user will be asked for confirmation and once
>>>>>>>>>>>>>> confirmed there are two options:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> - disable debugger for entire domain - useful when multiple

>>>>>>>>>>>>>> sites are developed on same domain (for manager)
>>>>>>>>>>>>>> - disabled for entire site - useful for production sites

Dmitry Andrejev

unread,
Jul 1, 2011, 4:02:38ā€ÆPM7/1/11
to in-por...@googlegroups.com
Yes, I like Alex's idea with Hostname resolving option!

DA
--


Best regards,

Dmitry A.

Phil -- wbtc.fr --

unread,
Jul 1, 2011, 4:53:02ā€ÆPM7/1/11
to in-por...@googlegroups.com
this idea sounds very easy to implement, I like it too :)


2011/7/1 Dmitry Andrejev <dand...@gmail.com>

Alexander Obuhovich

unread,
Jul 2, 2011, 4:28:49ā€ÆAM7/2/11
to in-por...@googlegroups.com
Then we need to start new discussion about hostname resolve abilities in debug.php file.

Dmitry A.

unread,
Nov 20, 2011, 4:55:39ā€ÆPM11/20/11
to in-por...@googlegroups.com
Hi guys,


I have came across the issue with currentĀ implementationĀ of this new functionality when you can Disable Debugger via Cookie setting. Basically, if you are running multiple websites on the same domain it will Disable the Debugger for all site on this domain instead of just the one I have specified. This is happens due to Website Path which is specified when Cookie is set.

By the way, I thought I would continue this discussion so it earlier to find all close related things in one place.


DA


Dmitry A.

unread,
Dec 6, 2011, 3:07:57ā€ÆPM12/6/11
to in-por...@googlegroups.com
Any ideas on this?

Alex, Phil?


DA

Phil -- wbtc.fr --

unread,
Dec 6, 2011, 3:33:07ā€ÆPM12/6/11
to in-por...@googlegroups.com
when you talk about multiple websites, is it Sitedomain, or separate installs?

If it's different installs, I'd suggest something which is missing, at least to me in daily work: ability to enable/disable debugger from admin, and maybe let IP setup in debug.php.


2011/12/6 Dmitry A. <dand...@gmail.com>

Alexander Obuhovich

unread,
Dec 6, 2011, 4:06:43ā€ÆPM12/6/11
to in-por...@googlegroups.com
This enable/disable debugger is only needed when your IP is already in debug.php but you won't want debug mode enabled and changing debug.php isn't an option.
Most usual case is when all computers in office share same IP address, used to access Internet. Then debug mode enabled for one IP resulting it enabled for all computers in office, which maybe not desired effect.

Dmitry is talking about a case, when you have several In-Portal installs on same domain and each install has it subfolder, e.g.:
Now we have a bug, when you disable debugger for one sub-site, then it is also disabled for other sub-sites as well.

Phil -- wbtc.fr --

unread,
Dec 7, 2011, 1:59:48ā€ÆAM12/7/11
to in-por...@googlegroups.com
do you mean that 1 debug.php file interact with other sub-sites, while it"s not in the same system folder?

anyway my proposal about admin setting is still good, as this could store an info in connected user's cookie.


2011/12/6 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Dec 7, 2011, 3:49:29ā€ÆAM12/7/11
to in-por...@googlegroups.com
Nope, this is the case, when each of sub-sites have that IP listed in each of them, but cookie to turn off debugger is set to whole domain and not a specific sub-site.
Reply all
Reply to author
Forward
0 new messages