FIRE-24262: Introduce an explicit label for "wear_folder" SLURLs to mitigate its abuse of trying to fool people into wearing the bunny default avatar
parent
3632d52eaa
commit
0be6b40b25
|
|
@ -1358,6 +1358,25 @@ std::string LLUrlEntryTeleport::getLocation(const std::string &url) const
|
|||
return ::getStringAfterToken(url, "app/teleport/");
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Wear folder SLUrl
|
||||
///
|
||||
/// FSUrlEntryWear Describes wear folder SLURL, e.g.
|
||||
/// secondlife:///app/wear_folder/?folder_id=bedd047e-a3d7-23e6-57bc-1ef367d848e7
|
||||
///
|
||||
FSUrlEntryWear::FSUrlEntryWear()
|
||||
{
|
||||
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/wear_folder/\\S+",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_slapp.xml";
|
||||
mTooltip = LLTrans::getString("TooltipFSUrlEntryWear");
|
||||
}
|
||||
|
||||
std::string FSUrlEntryWear::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
return LLTrans::getString("FSUrlEntryWearLabel");
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//
|
||||
// LLUrlEntrySL Describes a generic SLURL, e.g., a Url that starts
|
||||
// with secondlife:// (used as a catch-all for cases not matched above)
|
||||
|
|
|
|||
|
|
@ -499,6 +499,20 @@ public:
|
|||
/*virtual*/ std::string getLocation(const std::string &url) const;
|
||||
};
|
||||
|
||||
// <FS:Ansariel> Wear folder SLUrl
|
||||
///
|
||||
/// FSUrlEntryWear Describes wear folder SLURL, e.g.
|
||||
/// secondlife:///app/wear_folder/?folder_id=bedd047e-a3d7-23e6-57bc-1ef367d848e7
|
||||
///
|
||||
class FSUrlEntryWear : public LLUrlEntryBase
|
||||
{
|
||||
public:
|
||||
FSUrlEntryWear();
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
||||
// <FS:Ansariel> FS Help SLUrl
|
||||
///
|
||||
/// FSHelpDebugUrlEntrySL Describes a Firestorm Help SLURL, e.g.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
{
|
||||
// mUrlEntry.reserve(20);
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
|
||||
mUrlEntry.reserve(27);
|
||||
mUrlEntry.reserve(28);
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Urls are matched in the order that they were registered
|
||||
|
|
@ -84,6 +84,9 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
registerUrl(new LLUrlEntryInventory());
|
||||
registerUrl(new LLUrlEntryExperienceProfile());
|
||||
registerUrl(new FSHelpDebugUrlEntrySL()); // <FS:Ansariel> FS Help SLUrl
|
||||
// <FS:Ansariel> Wear folder SLUrl
|
||||
mUrlEntryWear = new FSUrlEntryWear();
|
||||
registerUrl(mUrlEntryWear);
|
||||
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
|
||||
//so it should be registered in the end of list
|
||||
registerUrl(new LLUrlEntrySL());
|
||||
|
|
@ -268,6 +271,13 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
|
|||
match_start = start;
|
||||
match_end = end;
|
||||
match_entry = url_entry;
|
||||
|
||||
// <FS:Ansariel> Wear folder SLUrl
|
||||
if (mUrlEntryWear == *it)
|
||||
{
|
||||
break;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ private:
|
|||
LLUrlEntryBase* mUrlEntryNoLink;
|
||||
// <FS:Ansariel> Normalize only trusted URL
|
||||
LLUrlEntryBase* mUrlEntryTrustedUrl;
|
||||
// <FS:Ansariel> Wear folder SLUrl
|
||||
LLUrlEntryBase* mUrlEntryWear;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -708,6 +708,9 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
|
|||
<string name="TooltipFSHelpDebugSLUrl">
|
||||
Anklicken, um das Fenster mit Debug-Einstellungen für diese Einstellung zu öffnen
|
||||
</string>
|
||||
<string name="TooltipFSUrlEntryWear">
|
||||
Anklicken, um den Inhalt eines Inventar-Ordners anzuziehen
|
||||
</string>
|
||||
<string name="CurrentURL" value=" CurrentURL: [CurrentURL]"/>
|
||||
<string name="TooltipEmail">
|
||||
Klicken, um eine E-Mail zu verfassen
|
||||
|
|
@ -6949,4 +6952,7 @@ Ihre aktuelle Position: [AVATAR_POS]
|
|||
<string name="No">
|
||||
Nein
|
||||
</string>
|
||||
<string name="FSUrlEntryWearLabel">
|
||||
Inventar-Ordner anziehen
|
||||
</string>
|
||||
</strings>
|
||||
|
|
|
|||
|
|
@ -340,6 +340,7 @@ Please try logging in again in a minute.</string>
|
|||
<string name="TooltipMapUrl">Click to view this location on a map</string>
|
||||
<string name="TooltipSLAPP">Click to run the secondlife:// command</string>
|
||||
<string name="TooltipFSHelpDebugSLUrl">Click to open the debug settings window for this setting</string>
|
||||
<string name="TooltipFSUrlEntryWear">Click to wear the contents of an inventory folder</string>
|
||||
<string name="CurrentURL" value=" CurrentURL: [CurrentURL]" />
|
||||
<string name="TooltipEmail">Click to compose an email</string>
|
||||
|
||||
|
|
@ -3144,4 +3145,5 @@ Your current position: [AVATAR_POS]
|
|||
</string>
|
||||
<string name="Yes">Yes</string>
|
||||
<string name="No">No</string>
|
||||
<string name="FSUrlEntryWearLabel">Wear inventory folder</string>
|
||||
</strings>
|
||||
|
|
|
|||
Loading…
Reference in New Issue