diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-07-19 14:35:44 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-07-19 14:35:44 -0700 |
commit | 8631a7a07743af00431c6f33361ab06405bcf114 (patch) | |
tree | e7d983394f5ca0cbe2465780e8205cf32ba67ad3 /indra/newview/llviewerregion.cpp | |
parent | 57da3e609fddb37ef3ddef830a0be84ebc5337bd (diff) | |
parent | be6066eae218856f7fd74b98968a75e5062fa830 (diff) |
Merge with tip of Master after a Viewer release
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 2fde4fe49c..7628a6c7ef 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; @@ -2241,7 +2250,7 @@ void LLViewerRegion::setSimulatorFeaturesReceived(bool received) mSimulatorFeaturesReceived = received; if (received) { - mSimulatorFeaturesReceivedSignal(getRegionID()); + mSimulatorFeaturesReceivedSignal(getRegionID(), this); mSimulatorFeaturesReceivedSignal.disconnect_all_slots(); } } @@ -3183,7 +3192,7 @@ void LLViewerRegion::setCapabilitiesReceived(bool received) // so that they can safely use getCapability(). if (received) { - mCapabilitiesReceivedSignal(getRegionID()); + mCapabilitiesReceivedSignal(getRegionID(), this); LLFloaterPermsDefault::sendInitialPerms(); |