Skip to content

Commit e1a5810

Browse files
committed
If the debugger is disabled or not in debug mode, the panels and visualizers are still being rendered and exploding. This should be a 404.
1 parent f5b6873 commit e1a5810

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
----
99

10+
## [3.4.1] => 2022-JUL-12
11+
12+
### Fixed
13+
14+
* If the debugger is disabled or not in debug mode, the panels and visualizers are still being rendered and exploding. This should be a 404.
15+
16+
----
17+
1018
## [3.4.0] => 2022-JUN-27
1119

1220
### Added

handlers/Main.cfc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,22 @@ component extends="coldbox.system.RestHandler" {
2121
}
2222

2323
// If not enabled, just 404 it
24-
if ( !variables.debuggerService.getDebugMode() ) {
25-
event.renderData(
26-
statusCode = 404,
27-
statusText = "Not Found",
28-
type = "text",
29-
data = "Page Not Found"
30-
);
24+
if ( !variables.debuggerService.getDebugMode() || !variables.debuggerConfig.enabled ) {
25+
event.overrideEvent( "cbdebugger:main.disabled" );
3126
}
3227
}
3328

29+
/**
30+
* Debugger disabled event
31+
*/
32+
function disabled( event, rc, prc ){
33+
event.renderData(
34+
statusCode = 404,
35+
statusText = "Not Found",
36+
type = "text",
37+
data = "Page Not Found"
38+
);
39+
}
3440

3541
/**
3642
* Visualize the request tracker

0 commit comments

Comments
 (0)