View Issue Details

IDProjectCategoryView StatusLast Update
0002068XdebugStep Debuggingpublic2022-04-04 11:32
Reporterncrusty Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.1.2 
Target Version3.1devFixed in Version3.1.4 
Summary0002068: Debug session can be started with "XDEBUG_SESSION_START=anything" when xdebug.trigger_value is set
Description

I'm trying to only start an xdebug session only when I pass a certain trigger string with the request via a cookie, like so:

GET https://1.2.3.4
cookie: XDEBUG_TRIGGER=mytriggerstring

Although I can get xdebug to start as planned with the trigger, I can also still start the session without the trigger using this generic request:

GET https://1.2.3.4?XDEBUG_SESSION_START=anything
Steps To Reproduce

Here's my complete xdebug config file:

xdebug.start_with_request=trigger
xdebug.mode=debug
xdebug.trigger_value=mytriggerstring
xdebug.client_host = 192.168.1.10

This is on CentOS 7 and here's my xdebug/php version:

PHP 7.4.27 (cli) (built: Dec 14 2021 17:17:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans

Here are logs from xdebug.log_level=10:

..passing no xdebug params:

[661] Log opened at 2022-02-24 02:40:03.415677
[661] [Config] DEBUG: Checking if trigger 'XDEBUG_TRIGGER' is enabled for mode 'debug'
[661] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[661] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[661] Log closed at 2022-02-24 02:40:03.416915

..passing my trigger via the cookie:

[663] Log opened at 2022-02-24 02:40:38.079079
[663] [Config] DEBUG: Checking if trigger 'XDEBUG_TRIGGER' is enabled for mode 'debug'
[663] [Config] DEBUG: The trigger value 'mytriggerstring' matched the shared secret 'mytriggerstring' for mode 'debug'
[663] [Step Debug] INFO: Connecting to configured address/port: 192.168.1.10:9003.
[663] [Step Debug] INFO: Connected to debugging client: 192.168.1.10:9003 (through xdebug.client_host/xdebug.client_port). :-)

..passing the XDEBUG_SESSION_START=anything cgi param

[661] Log opened at 2022-02-24 02:42:39.009885
[661] [Step Debug] DEBUG: Found 'XDEBUG_SESSION_START' HTTP variable, with value 'anything'
[661] [Step Debug] INFO: Connecting to configured address/port: 192.168.1.10:9003.
[661] [Step Debug] INFO: Connected to debugging client: 192.168.1.10:9003 (through xdebug.client_host/xdebug.client_port). :-)
TagsNo tags attached.
Operating SystemCentOS 7
PHP Version7.4.20-7.4.29

Activities

Issue History

Date Modified Username Field Change
2022-02-24 14:28 ncrusty New Issue
2022-03-07 14:27 derick Target Version => 3.1dev
2022-03-07 14:27 derick Summary I can start a debug session with "XDEBUG_SESSION_START=anything" even though my config is to only start with a trigger => Debug session can be started with "XDEBUG_SESSION_START=anything" when xdebug.trigger_value is set
2022-03-07 14:27 derick Note Added: 0006230
2022-03-07 15:47 derick Assigned To => derick
2022-03-07 15:47 derick Status new => closed
2022-03-07 15:47 derick Resolution open => fixed
2022-03-07 15:47 derick Fixed in Version => 3.1dev
2022-04-04 11:32 derick Fixed in Version 3.1dev => 3.1.4