Closed jonpas closed 7 months ago
@PabstMirror @BrettMayson
Not just security, this will also lead to incorrect in-game paths.
Arma 3 base files have the same issue, resulting in
/temp/bin/A3/Functions_F/Ambient/fn_ambientAnim.sqf
instead of
\A3\Functions_F\Ambient\fn_ambientAnim.sqf
The problem is that the "root" what would often be a p-drive root. Is unknown. We can try finding it by looking for PBOPREFIX, which might solve most cases (doesn't solve our vanilla A3 case)
Instead of that, I'll add "rootPathMapping" config entry. They will map physical paths to virtual paths.
So in your case the root path might be
"C:/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source" -> "\x\cba\"
Such that your file instead of
/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source/addons/common/fnc_test.sqf
will be translated to
\x\cba\addons/common/fnc_test.sqf
Also important note on this, this changes how the outputPath is handled.
result file is outputPath/virtualPath.
Because the virtualPath was previously bugged, it would output to example
P:/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source/addons/common/fnc_test.sqfc
But with the fix, it will now output to
P:\x\cba\addons/common/fnc_test.sqf
This is a security issue and should be remedied.