diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-04-08 16:17:00 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-04-08 16:17:00 +0300 |
commit | 1dfbce8169dbb9916723031e23a80548d9c496c3 (patch) | |
tree | a9ded39ada273e2fd7ac7dd46692dd330dd3d59f /indra/newview | |
parent | 9fe758e8bc747ff4fe7d4c5dcd1d7914aaa53195 (diff) |
SL-15082 fix for app/region SLURLS
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f007aefc70..359930b2cd 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -82,6 +82,8 @@ #include "llcallstack.h" #include "llsettingsdaycycle.h" +#include <boost/regex.hpp> + #ifdef LL_WINDOWS #pragma warning(disable:4355) #endif @@ -143,15 +145,22 @@ public: // build a secondlife://{PLACE} SLurl from this SLapp std::string url = "secondlife://"; + boost::regex name_rx("[A-Za-z0-9]+"); + boost::regex coord_rx("[0-9]+"); for (int i = 0; i < num_params; i++) { if (i > 0) { url += "/"; } + if (!boost::regex_match(params[i].asString(), i > 0 ? coord_rx : name_rx)) + { + return false; + } + url += params[i].asString(); } - + // Process the SLapp as if it was a secondlife://{PLACE} SLurl LLURLDispatcher::dispatch(url, "clicked", web, true); return true; |