diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-10-22 12:47:16 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-10-22 12:47:16 +0300 |
commit | 28339afa157956d6ae4e68d0f8ce4eee6a254cfe (patch) | |
tree | d176514abec3322c339753dac231c617259a11a3 /indra/newview | |
parent | 62a0ba3db4685e5572b05d4921e2fe9974af2ba7 (diff) |
MAINT-535 'trust model' is added for secondlife:// URLs in wiki style links. Chat history is marked as untrusted source now.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llchathistory.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/llurldispatcher.cpp | 6 | ||||
-rwxr-xr-x | indra/newview/llurldispatcher.h | 2 | ||||
-rwxr-xr-x | indra/newview/llurldispatcherlistener.cpp | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6c881b5717..69aeec3975 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -725,6 +725,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) editor_params.follows.flags = FOLLOWS_ALL; editor_params.enabled = false; // read only editor_params.show_context_menu = "true"; + editor_params.trusted_content = false; mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this); mEditor->setIsFriendCallback(LLAvatarActions::isFriend); } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 00b15a5f26..0c34db39b5 100755 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -307,7 +307,7 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& slurl) } // static -bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trusted_content) { // *NOTE: Text editors are considered sources of trusted URLs // in order to make avatar profile links in chat history work. @@ -315,9 +315,9 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) // receiving resident will see it and must affirmatively // click on it. // *TODO: Make this trust model more refined. JC - const bool trusted_browser = true; + LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content); } diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index 6309a97af5..9b05260af1 100755 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -53,7 +53,7 @@ public: static bool dispatchRightClick(const std::string& slurl); - static bool dispatchFromTextEditor(const std::string& slurl); + static bool dispatchFromTextEditor(const std::string& slurl, bool trusted_content); }; #endif diff --git a/indra/newview/llurldispatcherlistener.cpp b/indra/newview/llurldispatcherlistener.cpp index c7b9afafef..7545f3a9b3 100755 --- a/indra/newview/llurldispatcherlistener.cpp +++ b/indra/newview/llurldispatcherlistener.cpp @@ -71,5 +71,5 @@ void LLURLDispatcherListener::dispatchRightClick(const LLSD& params) const void LLURLDispatcherListener::dispatchFromTextEditor(const LLSD& params) const { - LLURLDispatcher::dispatchFromTextEditor(params["url"]); + LLURLDispatcher::dispatchFromTextEditor(params["url"], false); } |