FIRE-30939 - remove legacy Inworldz URI support

master
Beq 2021-05-11 22:30:58 +01:00
parent 005cd67cce
commit ae0598e3f4
4 changed files with 11 additions and 79 deletions

View File

@ -360,7 +360,7 @@ static BOOL isDefault(const std::string& scheme, U16 port)
void LLURI::parseAuthorityAndPathUsingOpaque()
{
if (mScheme == "http" || mScheme == "https" || mScheme == "hop" || mScheme == "inworldz" || mScheme == "iw" ||
if (mScheme == "http" || mScheme == "https" || mScheme == "hop" ||
mScheme == "ftp" || mScheme == "secondlife" ||
mScheme == "x-grid-location-info")
{

View File

@ -42,7 +42,7 @@
// <FS:AW> hop:// protocol>
//#define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))"
#define APP_HEADER_REGEX "(((hop|x-grid-location-info)://[-\\w\\.\\:\\@]+/app)|((hop|secondlife|inworldz|iw):///app))"
#define APP_HEADER_REGEX "(((hop|x-grid-location-info)://[-\\w\\.\\:\\@]+/app)|((hop|secondlife):///app))"
// </FS:AW>
// Utility functions
@ -354,9 +354,8 @@ std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const
LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
: LLUrlEntryBase()
{
// <FS:Ansariel> Inworldz special
//mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
mPattern = boost::regex("(https?://(maps.secondlife.com|slurl.com)/secondlife/|(secondlife|inworldz|iw)://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
// <FS:Beq> remove legacy Inworldz URI support. restore previous with addition of https
mPattern = boost::regex("(https?://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_http.xml";
mTooltip = LLTrans::getString("TooltipHttpUrl");
@ -1099,7 +1098,7 @@ LLUrlEntryObjectIM::LLUrlEntryObjectIM()
{
// <FS:AW> hop:// protocol; Ansa: Stop at first space so we can use it in notifications!
//mPattern = boost::regex("secondlife:///app/objectim/[\\da-f-]+\?\\S*\\w",
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/objectim/[\\da-f-]+\?[^ \t\r\n\v\f]*",
mPattern = boost::regex("(hop|secondlife):///app/objectim/[\\da-f-]+\?[^ \t\r\n\v\f]*",
// </FS:AW>
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_objectim.xml";
@ -1228,9 +1227,7 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data)
//
LLUrlEntryPlace::LLUrlEntryPlace()
{
// <FS:Ansariel> Inworldz special
//mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|(secondlife://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", // <AW: hop:// protocol>
mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|((secondlife|inworldz|iw)://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", // <AW: hop:// protocol>
mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|(secondlife://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", // <AW: hop:// protocol>
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
@ -1413,7 +1410,7 @@ std::string LLUrlEntryTeleport::getLocation(const std::string &url) const
///
FSUrlEntryWear::FSUrlEntryWear()
{
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/wear_folder/\\S+",
mPattern = boost::regex("(hop|secondlife):///app/wear_folder/\\S+",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipFSUrlEntryWear");
@ -1431,7 +1428,7 @@ std::string FSUrlEntryWear::getLabel(const std::string &url, const LLUrlLabelCal
//
LLUrlEntrySL::LLUrlEntrySL()
{
mPattern = boost::regex("(hop|secondlife|inworldz|iw)://(\\w+)?(:\\d+)?/\\S+", // <AW: hop:// protocol>
mPattern = boost::regex("(hop|secondlife)://(\\w+)?(:\\d+)?/\\S+", // <AW: hop:// protocol>
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipSLAPP");
@ -1449,7 +1446,7 @@ std::string LLUrlEntrySL::getLabel(const std::string &url, const LLUrlLabelCallb
///
FSHelpDebugUrlEntrySL::FSHelpDebugUrlEntrySL()
{
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/fshelp/showdebug/\\S+",
mPattern = boost::regex("(hop|secondlife):///app/fshelp/showdebug/\\S+",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipFSHelpDebugSLUrl");
@ -1468,7 +1465,7 @@ std::string FSHelpDebugUrlEntrySL::getLabel(const std::string &url, const LLUrlL
//
LLUrlEntrySLLabel::LLUrlEntrySLLabel()
{
mPattern = boost::regex("\\[(hop|secondlife|inworldz|iw)://\\S+[ \t]+[^\\]]+\\]", // <AW: hop:// protocol>
mPattern = boost::regex("\\[(hop|secondlife)://\\S+[ \t]+[^\\]]+\\]", // <AW: hop:// protocol>
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipSLAPP");

View File

@ -1384,10 +1384,6 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid)
{
ret = mGridList[grid][GRID_APP_SLURL_BASE].asString();
}
else if (grid == INWORLDZ_URI)
{
ret = "inworldz:///app";
}
else
{
std::string app_base;

View File

@ -59,11 +59,6 @@ const char* LLSLURL::SLURL_REGION_PATH = "region";
const char* LLSLURL::SIM_LOCATION_HOME = "home";
const char* LLSLURL::SIM_LOCATION_LAST = "last";
// Inworldz special
const char* LLSLURL::SLURL_INWORLDZ_SCHEME = "inworldz";
const char* LLSLURL::SLURL_IW_SCHEME = "iw";
const char* LLSLURL::PLACES_INWORLDZ_COM = "places.inworldz.com";
// resolve a simstring from a slurl
LLSLURL::LLSLURL(const std::string& slurl)
: mHypergrid(false)
@ -244,55 +239,6 @@ LLSLURL::LLSLURL(const std::string& slurl)
path_array.insert(0, slurl_uri.hostNameAndPort());
}
}
else if (slurl_uri.scheme() == LLSLURL::SLURL_INWORLDZ_SCHEME ||
slurl_uri.scheme() == LLSLURL::SLURL_IW_SCHEME)
{
LL_DEBUGS("SLURL") << "inworldz scheme" << LL_ENDL;
mGrid = INWORLDZ_URI;
if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
{
// it's in the form iw://<grid>/(app)
// so parse the grid name to derive the grid ID
if (!slurl_uri.hostNameAndPort().empty())
{
LL_DEBUGS("SLURL") << "(inworldz|iw)://<grid>/app" << LL_ENDL;
mGrid = LLGridManager::getInstance()->getGridByProbing(slurl_uri.hostNameAndPort());
if (mGrid.empty())
{
mGrid = LLGridManager::getInstance()->getGridByProbing(slurl_uri.hostName());
}
}
else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
{
LL_DEBUGS("SLURL") << "(inworldz|iw):///app" << LL_ENDL;
// for app style slurls, where no grid name is specified, assume the currently
// selected or logged in grid.
mGrid = LLGridManager::getInstance()->getGridId();
}
if (mGrid.empty() && LLStartUp::getStartupState() == STATE_STARTED)
{
// we couldn't find the grid in the grid manager, so bail
LL_WARNS("SLURL")<<"unable to find grid"<<LL_ENDL;
return;
}
mType = APP;
path_array.erase(0);
}
else
{
// it wasn't a /inworldz/<region> or /app/<params>, so it must be iw://<region>
// therefore the hostname will be the region name, and it's a location type
mType = LOCATION;
// 'normalize' it so the region name is in fact the head of the path_array
path_array.insert(0, slurl_uri.hostName());
}
}
else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME)
|| (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME)
|| (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)
@ -309,13 +255,6 @@ LLSLURL::LLSLURL(const std::string& slurl)
else
mGrid = default_grid;
}
// places.inworldz.com isn't your regular everyday slurl
else if (slurl_uri.hostName() == LLSLURL::PLACES_INWORLDZ_COM)
{
// likewise, places.inworldz.com implies inworldz and a location
mGrid = INWORLDZ_URI;
mType = LOCATION;
}
else
{
LL_DEBUGS("SLURL") << "slurl style Standalone" << LL_ENDL;
@ -402,7 +341,7 @@ LLSLURL::LLSLURL(const std::string& slurl)
LL_DEBUGS("SLURL") << "It's a location hop" << LL_ENDL;
mType = LOCATION;
}
else if (slurl_uri.hostName() != LLSLURL::PLACES_INWORLDZ_COM)
else
{
LL_DEBUGS("SLURL") << "Not a valid https/http/x-grid-location-info slurl " << slurl << LL_ENDL;
// not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL