Skip to content

Commit 9220d62

Browse files
committed
COLDBOX-1384 #resolve
ColdBox proxy not disallowing bxm proxies
1 parent 4c1e861 commit 9220d62

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

system/remote/ColdboxProxy.cfc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,16 @@ component serializable="false" accessors="true" {
361361
* Autowire the proxy on creation. This references the super class only, we use cgi information to get the actual proxy component path
362362
*/
363363
private function selfAutoWire(){
364-
var scriptName = CGI.SCRIPT_NAME;
364+
var scriptName = CGI.SCRIPT_NAME
365+
var extension = listLast( scriptName, "." )
365366

366-
// Only process this logic if hitting a remote proxy CFC directly and if ColdBox exists.
367+
// Only process cfc or bx extensions and if ColdBox is available, else ignore and let the engine handle it as a normal cfc request
367368
if (
368-
len( scriptName ) < 5 || !reFindNoCase( "(cfc|bx)", right( scriptName, 4 ) ) || !verifyColdBox(
369-
throwOnNotExist = false
370-
)
369+
( extension neq "cfc" && extension neq "bx" )
370+
||
371+
!verifyColdBox( throwOnNotExist = false )
371372
) {
372-
return;
373+
return
373374
}
374375

375376
// Find the path of the proxy component being called

0 commit comments

Comments
 (0)