-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
bx 1.10.1+51
compat-cfml 1.31.0-snapshot
orm 1.4.1-snapshot
cbSwagger 3.1.3+14
cbSwagger throws errors while trying to resolve various file refs we have it trying to find. An issue I see right now is that it passes some paths to FileInputStream which BoxLang understands to exist (maybe by implicitly expandPath'ing the args to fileExists), but which don’t actually exist on disk.
Here is a semi-reproduction of the issue:
fpath = "//resources/api/auth/authenticate.response.yml"
writedump(fileExists(fpath)) // true
writedump(fileRead(fpath)) // ok, no problem
createObject("java", "java.io.FileInputStream").init(fpath) // error: doesn't exist
createObject("java", "java.io.FileInputStream").init(expandPath(fpath)) // ok
In the cbSwagger parser there are a few places where fileExists() serves as a guard and paths that pass that test end up being used to initialize a FileInputStream, which crashes.
see also: https://ortussolutions.atlassian.net/browse/BL-2190
Reactions are currently unavailable