summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowsdl.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-01-09 16:39:30 -0500
committerMonty Brandenberg <monty@lindenlab.com>2013-01-09 16:39:30 -0500
commitcc0a4bf6acafe759baaccea65022c963373ea012 (patch)
treed4fe1f1e34b1ab0d140a37c1f80d09034824d3e8 /indra/llwindow/llwindowsdl.cpp
parent11e506f2eb979a5ddfc3ca6f9c626771ab012a78 (diff)
parentcdd45b9abb35b40f2a31e7433fb99e588df8b40b (diff)
Merge. Pull viewer-development in prior to filing DRTVWR merge request.
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r--indra/llwindow/llwindowsdl.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 39f8a36a6e..a15114cb9b 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -2516,6 +2516,23 @@ void exec_cmd(const std::string& cmd, const std::string& arg)
// Must begin with protocol identifier.
void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
{
+ bool found = false;
+ S32 i;
+ for (i = 0; i < gURLProtocolWhitelistCount; i++)
+ {
+ if (escaped_url.find(gURLProtocolWhitelist[i]) != std::string::npos)
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ llwarns << "spawn_web_browser called for url with protocol not on whitelist: " << escaped_url << llendl;
+ return;
+ }
+
llinfos << "spawn_web_browser: " << escaped_url << llendl;
#if LL_LINUX || LL_SOLARIS