summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-02-20 18:18:04 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-02-20 18:18:04 +0200
commit3a9d0e7fa9214b5f802dd558d1e4c7154bbadb3e (patch)
treef4fd149462164472c5a2922e30abcdd25b1d0a84 /indra
parentb305fb6411939bf6afbe2ecf2c1bdf765c9247a9 (diff)
Don't accept a full path as arg for require()
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llluamanager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp
index 9b74060139..164738bc3b 100644
--- a/indra/newview/llluamanager.cpp
+++ b/indra/newview/llluamanager.cpp
@@ -444,6 +444,9 @@ LLRequireResolver::LLRequireResolver(lua_State *L, std::string path) : mPathToRe
lua_getinfo(L, 1, "s", &ar);
mSourceChunkname = ar.source;
+ if (is_absolute_path(mPathToResolve))
+ luaL_argerrorL(L, 1, "cannot require a full path");
+
std::replace(mPathToResolve.begin(), mPathToResolve.end(), '\\', '/');
}