Michael Schmidt
06/19/2023, 11:07 PM<cfdump var="#[CGI.PATH_INFO, CGI.SCRIPT_NAME]#">
CGI.PATH_INFO
ADDRESS index.cfm/test/test
LUCEE CommandBox /test/test
ADOBE CommandBox /test/test
ADOBE IIS /test/test
ADDRESS index.cfm/test.cfm/test/test
LUCEE CommandBox /test.cfm
ADOBE CommandBox /test.cfm
ADOBE IIS /test.cfm/test/test
ADDRESS index.cfm/test.Cfm/test/test
LUCEE CommandBox /test.Cfm/test/test
ADOBE CommandBox /test.Cfm/test/test
ADOBE IIS /test.Cfm/test/testPeter Hoopes
06/20/2023, 4:53 AMserver.json
. That’s a default setup if you’re not careful…bdw429s
06/20/2023, 7:19 AMbdw429s
06/20/2023, 7:20 AMbdw429s
06/20/2023, 7:20 AMbdw429s
06/20/2023, 7:20 AMMichael Schmidt
06/20/2023, 12:36 PMMichael Schmidt
06/20/2023, 1:11 PMhttps://example.com/custom.cfm/frontPage/images.cfm/PrettyPicture.jpg▾
Michael Schmidt
06/20/2023, 1:16 PM{
"app": {
"cfengine": "adobe@2018"
},
"web": {
"rewrites": {
"enable": false
}
}
}
Michael Schmidt
06/20/2023, 3:26 PMValues of CGI.PATH_INFO
+------------------------------+--------------------------+--------------------------+---------------------+
| Address | Result Lucee Command Box | Result Adobe Command Box | Result Adobe IIS |
+------------------------------+--------------------------+--------------------------+---------------------+
| index.cfm/test/test | /test/test | /test/test | /test/test |
| index.cfm/test.cfm/test/test | /test.cfm | /test.cfm | /test.cfm/test/test |
| index.cfm/test.Cfm/test/test | /test.Cfm/test/test | /test.Cfm/test/test | test.Cfm/test/test |
+------------------------------+--------------------------+--------------------------+---------------------+
bdw429s
06/20/2023, 4:14 PMbdw429s
06/20/2023, 4:14 PM<http://site.com/foo/bar|site.com/foo/bar>
in the browser but have it rewritten to
<http://site.com/index.com/foo/bar|site.com/index.com/foo/bar>
on the backendbdw429s
06/20/2023, 4:15 PMbdw429s
06/20/2023, 4:29 PMweb.xml
files have servlet mappings like this in them
index.cfm/*
which is how they match stuff after the file.bdw429s
06/20/2023, 4:30 PM*.cfm/*
which matches any file name in any folder with anything after it, but this does NOT meet the servlet spec. Only Macromedia JRun and Adobne's hacked up version of Tomcat supports this.bdw429s
06/20/2023, 4:31 PMbdw429s
06/20/2023, 4:32 PM.cfm
part to .cFm
bdw429s
06/20/2023, 4:32 PMbdw429s
06/20/2023, 4:33 PMbdw429s
06/20/2023, 4:37 PM.+
portion matches as much as possible so it matches all the way to the last .cfm
it finds!bdw429s
06/20/2023, 4:37 PM/foo.cfm/brad.cfm/wood
so I had never tested it!bdw429s
06/20/2023, 4:38 PMMichael Schmidt
06/20/2023, 4:38 PMMichael Schmidt
06/20/2023, 4:39 PMbdw429s
06/20/2023, 4:39 PMMichael Schmidt
06/20/2023, 4:40 PMbdw429s
06/20/2023, 4:40 PM^(/.+?\.cf[cm])(/.*)
has the desired affectbdw429s
06/20/2023, 4:41 PMbdw429s
06/20/2023, 4:41 PMbdw429s
06/20/2023, 4:42 PMMichael Schmidt
06/20/2023, 4:43 PMbdw429s
06/20/2023, 7:54 PMbdw429s
06/20/2023, 7:55 PM.cfm
matching is case sensitive mostly because the servlet filter is also case sensitive meaning the first occurrence of *.cfm/
in the path does need to be lowercase for CF to process it. And while it is possible to add upper case servlet mappings to a custom web.xml
, that's not common to see and Adobe doesn't ship their web.xml like that out of the box.Michael Schmidt
06/20/2023, 8:39 PMbdw429s
06/20/2023, 10:12 PMMichael Schmidt
06/20/2023, 11:10 PM