summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-02 15:49:30 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-02 21:48:12 +0200
commit35661866fbaa5d1b1437c998d61121cf651839a5 (patch)
treea9cb44821f90e8d4367a3e00671a24c137c1b42b
parent7991ae892ef0f717636c0fe3c0eff0a5f92e6bb8 (diff)
#5086 Fix 'Copy SLURL' generating obsolete http link
use https
-rw-r--r--indra/llcommon/lluriparser.cpp2
-rw-r--r--indra/llprimitive/llmediaentry.cpp2
-rw-r--r--indra/llui/llurlentry.cpp4
-rw-r--r--indra/newview/llfilepicker_mac.h2
-rw-r--r--indra/newview/llfloater360capture.cpp2
-rw-r--r--indra/newview/llimprocessing.cpp12
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp2
-rw-r--r--indra/newview/llurllineeditorctrl.cpp4
-rw-r--r--indra/newview/llviewernetwork.cpp4
-rw-r--r--indra/newview/llvovolume.cpp8
-rw-r--r--indra/newview/llwindowlistener.cpp4
-rw-r--r--indra/newview/tests/llslurl_test.cpp20
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
13 files changed, 40 insertions, 28 deletions
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 33a48d970d..1d246bb70e 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -33,7 +33,7 @@ LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedT
{
if (u.find("://") == std::string::npos)
{
- mNormalizedUri = "http://";
+ mNormalizedUri = "https://";
mTmpScheme = true;
}
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp
index b5b17c53aa..48c6ba1fa5 100644
--- a/indra/llprimitive/llmediaentry.cpp
+++ b/indra/llprimitive/llmediaentry.cpp
@@ -74,7 +74,7 @@ const char* LLMediaEntry::WHITELIST_KEY = MEDIA_WHITELIST_KEY_STR;
const char* LLMediaEntry::PERMS_INTERACT_KEY = MEDIA_PERMS_INTERACT_KEY_STR;
const char* LLMediaEntry::PERMS_CONTROL_KEY = MEDIA_PERMS_CONTROL_KEY_STR;
-#define DEFAULT_URL_PREFIX "http://"
+#define DEFAULT_URL_PREFIX "https://"
// Constructor(s)
LLMediaEntry::LLMediaEntry() :
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 95603d7ed5..bba80dd20e 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -234,7 +234,7 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const
|| label.find("www.") != std::string::npos)
&& label.find("://") == std::string::npos)
{
- label = "http://" + label;
+ label = "https://" + label;
}
return !LLUrlRegistry::instance().hasUrl(label);
@@ -315,7 +315,7 @@ std::string LLUrlEntryHTTP::getUrl(const std::string &string) const
{
if (string.find("://") == std::string::npos)
{
- return "http://" + escapeUrl(string);
+ return "https://" + escapeUrl(string);
}
return escapeUrl(string);
}
diff --git a/indra/newview/llfilepicker_mac.h b/indra/newview/llfilepicker_mac.h
index f0e9ce81dc..d0374c5a08 100644
--- a/indra/newview/llfilepicker_mac.h
+++ b/indra/newview/llfilepicker_mac.h
@@ -44,7 +44,7 @@ std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::st
// doLoadDialogModeless if window does not exists creates a modeless
// window, if it does exist, creates a 'sheet' that does not block
-// thead but blocks window interractions
+// thread but blocks window interractions
void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
unsigned int flags,
void (*callback)(bool, std::vector<std::string>&, void*),
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 25970f8a08..95e7b9af41 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -716,7 +716,7 @@ void LLFloater360Capture::onSaveLocalBtn()
{
// region name and URL
std::string region_name; // no sensible default
- std::string region_url("http://secondlife.com");
+ std::string region_url("https://secondlife.com");
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index fe567ac7ec..779ed725ac 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -202,9 +202,19 @@ void inventory_offer_handler(LLOfferInfo* info)
auto indx = msg.find(" ( http://slurl.com/secondlife/");
if (indx == std::string::npos)
{
- // try to find new slurl host
+ // https
+ indx = msg.find(" ( https://slurl.com/secondlife/");
+ }
+ if (indx == std::string::npos)
+ {
+ // try to find new slurl http host
indx = msg.find(" ( http://maps.secondlife.com/secondlife/");
}
+ if (indx == std::string::npos)
+ {
+ // try to find new slurl https host
+ indx = msg.find(" ( https://maps.secondlife.com/secondlife/");
+ }
if (indx >= 0)
{
LLStringUtil::truncate(msg, indx);
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index 6e4e9f426d..68e2808a83 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -220,7 +220,7 @@ const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string&
if ( candidate_url.scheme().empty() )
{
// build a URL comprised of default scheme and the original fragment
- const std::string default_scheme( "http://" );
+ const std::string default_scheme( "https://" );
return default_scheme + src_url;
};
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
index de0ed645eb..871bf36ed3 100644
--- a/indra/newview/llurllineeditorctrl.cpp
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -84,7 +84,9 @@ void LLURLLineEditor::copyEscapedURLToClipboard()
const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
LLWString text_to_copy;
// *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335).
- if (LLStringUtil::startsWith(unescaped_text, "http://") || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL
+ if (LLStringUtil::startsWith(unescaped_text, "https://")
+ || LLStringUtil::startsWith(unescaped_text, "http://")
+ || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL
text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
else // human-readable location
text_to_copy = utf8str_to_wstring(unescaped_text);
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index f11fa09ce9..890580ddff 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -69,7 +69,7 @@ const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bi
const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
-const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
+const std::string MAIN_GRID_SLURL_BASE = "https://maps.secondlife.com/secondlife/";
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
const std::string MAIN_GRID_WEB_PROFILE_URL = "https://my.secondlife.com/";
@@ -281,7 +281,7 @@ bool LLGridManager::addGrid(LLSD& grid_data)
// Populate to the default values
if (!grid_data.has(GRID_LOGIN_PAGE_VALUE))
{
- grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/";
+ grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("https://") + grid + "/app/login/";
}
if (!grid_data.has(GRID_HELPER_URI_VALUE))
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 89cc05802d..9c0f4baf28 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2693,10 +2693,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
if (mep && impl)
{
std::string url = mep->getCurrentURL();
- // Look for a ":", if not there, assume "http://"
+ // Look for a ":", if not there, assume "https://"
if (!url.empty() && std::string::npos == url.find(':'))
{
- url = "http://" + url;
+ url = "https://" + url;
}
// If the url we're trying to "bounce back" to is either empty or not
// allowed by the whitelist, try the home url. If *that* doesn't work,
@@ -2704,10 +2704,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
if (url.empty() || !mep->checkCandidateUrl(url))
{
url = mep->getHomeURL();
- // Look for a ":", if not there, assume "http://"
+ // Look for a ":", if not there, assume "https://"
if (!url.empty() && std::string::npos == url.find(':'))
{
- url = "http://" + url;
+ url = "https://" + url;
}
}
if (url.empty() || !mep->checkCandidateUrl(url))
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index edaa44aa70..6d234a9a34 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -54,7 +54,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter&
"Given [\"keysym\"], [\"keycode\"] or [\"char\"], inject the specified ";
std::string keyExplain =
"(integer keycode values, or keysym string from any addKeyName() call in\n"
- "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llwindow/llkeyboard.cpp )\n";
+ "https://github.com/secondlife/viewer/blob/develop/indra/llwindow/llkeyboard.cpp )\n";
std::string mask =
"Specify optional [\"mask\"] as an array containing any of \"CTL\", \"ALT\",\n"
"\"SHIFT\" or \"MAC_CONTROL\"; the corresponding modifier bits will be combined\n"
@@ -69,7 +69,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter&
"(button values \"LEFT\", \"MIDDLE\", \"RIGHT\")\n";
std::string paramsExplain =
"[\"path\"] is as for LLUI::getInstance()->resolvePath(), described in\n"
- "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llui/llui.h\n"
+ "https://github.com/secondlife/viewer/blob/develop/indra/llui/llui.h\n"
"If you omit [\"path\"], you must specify both [\"x\"] and [\"y\"].\n"
"If you specify [\"path\"] without both [\"x\"] and [\"y\"], will synthesize (x, y)\n"
"in the center of the LLView selected by [\"path\"].\n"
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index fc9f5b707a..3ff38ea372 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -177,15 +177,15 @@ namespace tut
LLSLURL slurl = LLSLURL("");
ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION);
- slurl = LLSLURL("http://slurl.com/secondlife/myregion");
+ slurl = LLSLURL("https://slurl.com/secondlife/myregion");
ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
- slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ slurl = LLSLURL("https://maps.secondlife.com/secondlife/myregion/1/2/3");
ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("secondlife://");
ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY);
@@ -196,27 +196,27 @@ namespace tut
slurl = LLSLURL("secondlife://myregion");
ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("secondlife://myregion/1/2/3");
ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("/myregion");
ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/region slurl, region ", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("/myregion/1/2/3");
ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/ slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("my region/1/2/3");
ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("my.grid.com");
slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3");
@@ -309,7 +309,7 @@ namespace tut
slurl = LLSLURL("my region", LLVector3(1,2,3));
ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" default grid/region/vector", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("MyGrid");
slurl = LLSLURL("my region", LLVector3(1,2,3));
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index d9cb9e7538..94cf0fcf10 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -391,7 +391,7 @@ namespace tut
std::string("https://minimal.long.name/helpers/"));
ensure_equals("minimal grid login page",
LLGridManager::getInstance()->getLoginPage("minimal.long.name"),
- std::string("http://minimal.long.name/app/login/"));
+ std::string("https://minimal.long.name/app/login/"));
}