diff options
Diffstat (limited to 'indra/newview/llurldispatcher.cpp')
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index cb68045310..901d0594f1 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -158,7 +158,8 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, LLMediaCtrl* web, bool trusted_browser) { - if (!LLSLURL::isSLURL(url)) + // ensure the URL is in the secondlife:///app/ format + if (!LLSLURL::isSLURLCommand(url)) { return false; } @@ -170,7 +171,14 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, pathArray.erase(0); // erase "cmd" bool handled = LLCommandDispatcher::dispatch( cmd, pathArray, uri.queryMap(), web, trusted_browser); - return handled; + + // alert if we didn't handle this secondlife:///app/ SLURL + // (but still return true because it is a valid app SLURL) + if (! handled) + { + LLNotifications::instance().add("UnsupportedCommandSLURL"); + } + return true; } // static @@ -323,7 +331,7 @@ public: // Teleport requests *must* come from a trusted browser // inside the app, otherwise a malicious web page could // cause a constant teleport loop. JC - LLTeleportHandler() : LLCommandHandler("teleport", true) { } + LLTeleportHandler() : LLCommandHandler("teleport", UNTRUSTED_BLOCK) { } bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) |