diff options
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index f79730b..0e39026 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -539,9 +539,9 @@ void process_places_reply(LLMessageSystem* msg, void** data) | |||
539 | 539 | ||
540 | void send_sound_trigger(const LLUUID& sound_id, F32 gain) | 540 | void send_sound_trigger(const LLUUID& sound_id, F32 gain) |
541 | { | 541 | { |
542 | if (sound_id.isNull()) | 542 | if (sound_id.isNull() || gAgent.getRegion() == NULL) |
543 | { | 543 | { |
544 | // zero guids don't get sent (no sound) | 544 | // disconnected agent or zero guids don't get sent (no sound) |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | 547 | ||
@@ -861,7 +861,9 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) | |||
861 | } | 861 | } |
862 | 862 | ||
863 | if(gSavedSettings.getBOOL("ShowInInventory") && | 863 | if(gSavedSettings.getBOOL("ShowInInventory") && |
864 | asset_type != LLAssetType::AT_CALLINGCARD) | 864 | asset_type != LLAssetType::AT_CALLINGCARD && |
865 | item->getInventoryType() != LLInventoryType::IT_ATTACHMENT && | ||
866 | !from_name.empty()) | ||
865 | { | 867 | { |
866 | LLInventoryView::showAgentInventory(TRUE); | 868 | LLInventoryView::showAgentInventory(TRUE); |
867 | } | 869 | } |
@@ -5157,6 +5159,11 @@ void process_initiate_download(LLMessageSystem* msg, void**) | |||
5157 | msg->getString("FileData", "SimFilename", sim_filename); | 5159 | msg->getString("FileData", "SimFilename", sim_filename); |
5158 | msg->getString("FileData", "ViewerFilename", viewer_filename); | 5160 | msg->getString("FileData", "ViewerFilename", viewer_filename); |
5159 | 5161 | ||
5162 | if (!gXferManager->validateFileForRequest(viewer_filename)) | ||
5163 | { | ||
5164 | llwarns << "SECURITY: Unauthorized download to local file " << viewer_filename << llendl; | ||
5165 | return; | ||
5166 | } | ||
5160 | gXferManager->requestFile(viewer_filename, | 5167 | gXferManager->requestFile(viewer_filename, |
5161 | sim_filename, | 5168 | sim_filename, |
5162 | LL_PATH_NONE, | 5169 | LL_PATH_NONE, |