Xdebug 2.3: Shared Secret to Enable Tracing or Profiling
This is the sixth article in a series about new features in Xdebug 2.3, which was first released on February 22nd.
Xdebug's profiling and trace file capabilities can both be triggered by a cookie, GET or POST variable, as long as you have enabled xdebug.profiler_enable_trigger and/or xdebug.trace_enable_trigger. With these triggers enabled, anybody could initiate a profile run, or trace file, by simply sending the XDEBUG_PROFILE or XDEBUG_TRACE cookies with an HTTP request.
Although you should not really run Xdebug in production, you can see that this is not an optimal solution.
Xdebug 2.3 adds supports for shared secrets for the trace file and profiler triggers through the xdebug.trace_enable_trigger_value and xdebug.profiler_enable_trigger_value. If these settings are changed from their default (empty string), then the value of XDEBUG_PROFILE needs to match the value of xdebug.profiler_enable_trigger_value, and the value of XDEBUG_TRACE needs to match the value of xdebug.trace_enable_trigger_value in order for the profiling to start, or the trace file to be generated.
Often users would use one of the browser extensions for triggering profile runs or enabling tracing, these extensions need to be updated. The author of The easiest Xdebug, Nikita Nikitin, managed to get an updated version out before I could complete this article. It now has support for supplying your own values for XDEBUG_TRACE and XDEBUG_PROFILE:
The other two browser helpers have not been updated yet. I have emailed the author of Chrome's Xdebug helper, and I have filled an issue for Safari's xdebug-helper-for-safari on Github. Let's hope they get updated soon too.
Other parts in this series:
Life Line
Finally A Photo Of A Cetti's Warbler
I have heard their songs countless times — they're very loud! And seen fleeting glances if then before. But finally one decided to almost pose on this branch in the reeds of the WWT London Wetland Centre, right in the city.
#photography #Birds #BirdPhotography #BirdsOfFediverse #NaturePhotography #wildlife #london #wwt
Merge branch 'v2022'
Fix test after recent data update
Specify motorcycle parking fees
Specify motorcycle parking capacities
Specify motorcycle parkings covers
Specify parking access
Specify whether public transport stops have bins
Specify whether pedestrian crossings have islands
Survey postbox collection times
Specify whether crosswalks have tactile paving
Specify whether kerbs have tactile paving
Determine the heights of kerbs
Specify bicycle parkings covers
Specify whether pedestrian crossings have markings
Specify whether pedestrian crossings have traffic signals
Specify whether there are crossings at intersections of paths and roads
Determine roads lane count
Specify whether roads have lane markings
Specify width of opening
Survey whether benches have backrests
Survey opening hours
Specify access to places
Great Egret Has Caught a Fish
A bit in the distance, but the first time a got a reasonable shot of a Great Egret at WWT Arundel. It had caught a fish, which it then proceeded to eat. I love its green eye. Hopefully I get to see it a bit closer at some point.
#photography #Birds #BirdPhotography #BirdsOfFediverse #NaturePhotography #wildlife #wwt #Arundel
Taking Off
This Black-headed gull had been bobbing around for a bit, but decided to circle around. Caught it just at the right time at WWT Arundel.
#photography #Birds #BirdPhotography #BirdsOfFediverse #NaturePhotography #wildlife #Arundel #WWT




Shortlink
This article has a short URL available: https://drck.me/sharedsecret23-bow