mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
[FIRE-36262] Fixed crash in inventory_offer_name_callback calling llformat with unescaped % characters
This commit is contained in:
@@ -1840,10 +1840,10 @@ void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response)
|
||||
mRespondFunctions[name](notification, response);
|
||||
}
|
||||
|
||||
void inventory_offer_name_callback(const LLAvatarName& av_name, std::string message)
|
||||
void inventory_offer_name_callback(const LLAvatarName& av_name, const std::string& from_name, const std::string& message)
|
||||
{
|
||||
LLSD args;
|
||||
args["MESSAGE"] = llformat(message.c_str(), av_name.getUserName().c_str());
|
||||
args["MESSAGE"] = llformat(from_name.c_str(), av_name.getUserName().c_str()) + message;
|
||||
LLNotificationsUtil::add("SystemMessageTip", args);
|
||||
}
|
||||
|
||||
@@ -1992,8 +1992,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
size_t separator_idx = mFromName.find('|');
|
||||
if (separator_idx != std::string::npos && LLUUID::parseUUID(mFromName.substr(0, separator_idx), &inv_sender_id) && mFromName.size() > (++separator_idx))
|
||||
{
|
||||
log_message = mFromName.substr(separator_idx) + log_message;
|
||||
LLAvatarNameCache::instance().get(inv_sender_id, boost::bind(&inventory_offer_name_callback, _2, log_message));
|
||||
LLAvatarNameCache::instance().get(inv_sender_id, boost::bind(&inventory_offer_name_callback, _2, mFromName.substr(separator_idx), log_message));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user