Always show complete avatar name instead of displayname when changing avatar permissions etc. to avoid spoofing

Tue, 16 Dec 2014 14:35:18 +0100

author
Ansariel
date
Tue, 16 Dec 2014 14:35:18 +0100
changeset 43081
86b7a2faaaef
parent 43080
f143f78f52e2
child 43082
3e36f166323e

Always show complete avatar name instead of displayname when changing avatar permissions etc. to avoid spoofing

indra/newview/fsfloatercontacts.cpp file | annotate | diff | revisions
indra/newview/fspanelprofile.cpp file | annotate | diff | revisions
indra/newview/llavatarlistitem.cpp file | annotate | diff | revisions
indra/newview/llcallingcard.cpp file | annotate | diff | revisions
indra/newview/llpanelgrouproles.cpp file | annotate | diff | revisions
indra/newview/llviewermessage.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/fsfloatercontacts.cpp	Tue Dec 16 09:52:20 2014 +0100
     1.2 +++ b/indra/newview/fsfloatercontacts.cpp	Tue Dec 16 14:35:18 2014 +0100
     1.3 @@ -43,6 +43,7 @@
     1.4  #include "llgrouplist.h"
     1.5  #include "llnotificationsutil.h"
     1.6  #include "llscrolllistctrl.h"
     1.7 +#include "llslurl.h"
     1.8  #include "llstartup.h"
     1.9  #include "lltabcontainer.h"
    1.10  #include "llviewermenu.h"
    1.11 @@ -870,12 +871,7 @@
    1.12  		// for single friend, show their name
    1.13  		if (ids.size() == 1)
    1.14  		{
    1.15 -			LLUUID agent_id = ids.begin()->first;
    1.16 -			std::string name;
    1.17 -			if (gCacheName->getFullName(agent_id, name))
    1.18 -			{
    1.19 -				args["NAME"] = name;
    1.20 -			}
    1.21 +			args["NAME"] = LLSLURL("agent", ids.begin()->first, "completename").getSLURLString();
    1.22  			if (command == GRANT)
    1.23  			{
    1.24  				LLNotificationsUtil::add("GrantModifyRights", 
     2.1 --- a/indra/newview/fspanelprofile.cpp	Tue Dec 16 09:52:20 2014 +0100
     2.2 +++ b/indra/newview/fspanelprofile.cpp	Tue Dec 16 14:35:18 2014 +0100
     2.3 @@ -1929,10 +1929,9 @@
     2.4  }
     2.5  
     2.6  void FSPanelAvatarNotes::confirmModifyRights(bool grant, S32 rights)
     2.7 -// AO: If this is modified, also modify LLPanelAvatar::ConfirmModifyRights
     2.8  {
     2.9  	LLSD args;
    2.10 -	args["NAME"] = LLSLURL("agent", getAvatarId(), "displayname").getSLURLString();
    2.11 +	args["NAME"] = LLSLURL("agent", getAvatarId(), "completename").getSLURLString();
    2.12  
    2.13  	if (grant)
    2.14  	{
     3.1 --- a/indra/newview/llavatarlistitem.cpp	Tue Dec 16 09:52:20 2014 +0100
     3.2 +++ b/indra/newview/llavatarlistitem.cpp	Tue Dec 16 14:35:18 2014 +0100
     3.3 @@ -1122,7 +1122,9 @@
     3.4  // Same as llpanelavatar::confirmModifyRights
     3.5  {
     3.6  	LLSD args;
     3.7 -	args["NAME"] = LLSLURL("agent", getAvatarId(), "displayname").getSLURLString();
     3.8 +	// <FS:Ansariel> Always show complete name in rights confirmation dialogs
     3.9 +	//args["NAME"] = LLSLURL("agent", getAvatarId(), "displayname").getSLURLString();
    3.10 +	args["NAME"] = LLSLURL("agent", getAvatarId(), "completename").getSLURLString();
    3.11  	
    3.12  	if (grant)
    3.13  	{
     4.1 --- a/indra/newview/llcallingcard.cpp	Tue Dec 16 09:52:20 2014 +0100
     4.2 +++ b/indra/newview/llcallingcard.cpp	Tue Dec 16 14:35:18 2014 +0100
     4.3 @@ -706,7 +706,9 @@
     4.4  				if((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^  new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS)
     4.5  				{
     4.6  					LLSD args;
     4.7 -					args["NAME"] = LLSLURL("agent", agent_id, "displayname").getSLURLString();
     4.8 +					// <FS:Ansariel> Always show complete name in rights dialogs
     4.9 +					//args["NAME"] = LLSLURL("agent", agent_id, "displayname").getSLURLString();
    4.10 +					args["NAME"] = LLSLURL("agent", agent_id, "completename").getSLURLString();
    4.11  					
    4.12  					LLSD payload;
    4.13  					payload["from_id"] = agent_id;
     5.1 --- a/indra/newview/llpanelgrouproles.cpp	Tue Dec 16 09:52:20 2014 +0100
     5.2 +++ b/indra/newview/llpanelgrouproles.cpp	Tue Dec 16 14:35:18 2014 +0100
     5.3 @@ -1227,7 +1227,9 @@
     5.4  		for (uuid_vec_t::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i)
     5.5  		{
     5.6  			LLSD args;
     5.7 -			args["AVATAR_NAME"] = LLSLURL("agent", *i, "displayname").getSLURLString();
     5.8 +			// <FS:Ansariel> Always show complete name in rights confirmation dialogs
     5.9 +			//args["AVATAR_NAME"] = LLSLURL("agent", *i, "displayname").getSLURLString();
    5.10 +			args["AVATAR_NAME"] = LLSLURL("agent", *i, "completename").getSLURLString();
    5.11  			args["GROUP_NAME"] = group_data->mName;
    5.12  			
    5.13  			LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args));
     6.1 --- a/indra/newview/llviewermessage.cpp	Tue Dec 16 09:52:20 2014 +0100
     6.2 +++ b/indra/newview/llviewermessage.cpp	Tue Dec 16 14:35:18 2014 +0100
     6.3 @@ -8518,10 +8518,13 @@
     6.4  
     6.5  		// Record the offer.
     6.6  		{
     6.7 -			std::string target_name;
     6.8 -			gCacheName->getFullName(target_id, target_name);  // for im log filenames
     6.9 +			// <FS:Ansariel> Show complete name for TP lures
    6.10 +			//std::string target_name;
    6.11 +			//gCacheName->getFullName(target_id, target_name);  // for im log filenames
    6.12  			LLSD args;
    6.13 -			args["TO_NAME"] = LLSLURL("agent", target_id, "displayname").getSLURLString();;
    6.14 +			//args["TO_NAME"] = LLSLURL("agent", target_id, "displayname").getSLURLString();;
    6.15 +			args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();
    6.16 +			// </FS:Ansariel>
    6.17  	
    6.18  			LLSD payload;
    6.19  				

mercurial