summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorRunitai <>2010-01-11 11:24:04 -0600
committerRunitai <>2010-01-11 11:24:04 -0600
commit78cb4204a471129a3f3486d33cf115de816de36c (patch)
treebd2d8ea33a1c9d8b2893a1e8efc480d5bb87dc3a /indra/newview/llvovolume.cpp
parent2a00a16f57daf7c3f99b0374901c03644a5b5f1b (diff)
parentfddc7d856e420b24e67f1f20af7bc45817a1a8fb (diff)
Merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 55609621b3..d23bcf9006 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1852,12 +1852,22 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
if (mep && impl)
{
std::string url = mep->getCurrentURL();
- if (url.empty())
+ // If the url we're trying to "bounce back" to is either empty or not
+ // allowed by the whitelist, try the home url. If *that* doesn't work,
+ // set the media as failed and unload it
+ if (url.empty() || !mep->checkCandidateUrl(url))
{
url = mep->getHomeURL();
}
- if (! url.empty())
- {
+ if (url.empty() || !mep->checkCandidateUrl(url))
+ {
+ // The url to navigate back to is not good, and we have nowhere else
+ // to go.
+ LL_WARNS("MediaOnAPrim") << "FAILED to bounce back URL \"" << url << "\" -- unloading impl" << LL_ENDL;
+ impl->setMediaFailed(true);
+ }
+ else {
+ // Okay, navigate now
LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL;
impl->navigateTo(url, "", false, true);
}