Merge branch 'DRTVWR-521-maint' of https://bitbucket.org/lindenlab/viewer
commit
f843a97aeb
|
|
@ -2405,18 +2405,18 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>106d16623ee9a580b20777e8072a08cb</string>
|
||||
<string>35f42f538f4dc3abdfc2b2c4a915d004</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82745/775330/llca-202106010215.560271-common-560271.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87228/802959/llca-202109010216.563493-common-563493.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>202106010215.560271</string>
|
||||
<string>202109010216.563493</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -696,6 +696,66 @@ bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD
|
|||
return true;
|
||||
}
|
||||
|
||||
// This function injects a previously stored OpenID cookie into
|
||||
// each new media instance - see SL-15867 for details. It appears
|
||||
// that the way we use the cache, shared between multiple CEF
|
||||
// instances means that sometimes the OpenID cookie cannot be read
|
||||
// even though it appears to be there. The long term solution to
|
||||
// this is to create a separate cache directory for each instance
|
||||
// but that has its own set of problems. This short term approach
|
||||
// "forces" each new media instance to have a copy of the cookie
|
||||
// so that a page that needs it - e.g. Profiles - finds it and
|
||||
// can log in successfully.
|
||||
void LLPluginClassMedia::injectOpenIDCookie()
|
||||
{
|
||||
// can be called before we know who the user is at login
|
||||
// and there is no OpenID cookie at that point so no
|
||||
// need to try to set it (these values will all be empty)
|
||||
if (sOIDcookieName.length() && sOIDcookieValue.length())
|
||||
{
|
||||
setCookie(sOIDcookieUrl, sOIDcookieName,
|
||||
sOIDcookieValue, sOIDcookieHost, sOIDcookiePath, sOIDcookieHttpOnly, sOIDcookieSecure);
|
||||
}
|
||||
}
|
||||
|
||||
// We store each component of the OpenI cookie individuality here
|
||||
// because previously, there was some significant parsing to
|
||||
// break up the raw string into these components and we do not
|
||||
// want to have to do that again here. Stored as statics because
|
||||
// we want to share their value between all instances of this
|
||||
// class - the ones that receive it at login and any others
|
||||
// that open afterwards (e.g. the Profiles floater)
|
||||
std::string LLPluginClassMedia::sOIDcookieUrl = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieName = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieValue = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookieHost = std::string();
|
||||
std::string LLPluginClassMedia::sOIDcookiePath = std::string();
|
||||
bool LLPluginClassMedia::sOIDcookieHttpOnly = false;
|
||||
bool LLPluginClassMedia::sOIDcookieSecure = false;
|
||||
|
||||
// Once we receive the OpenID cookie, it is parsed/processed
|
||||
// in llViewerMedia::parseRawCookie() and then the component
|
||||
// values are stored here so that next time a new media
|
||||
// instance is created, we can use injectOpenIDCookie()
|
||||
// to "insist" that the cookie store remember its value.
|
||||
// One might ask why we need to go via LLViewerMedia (which
|
||||
// makes this call) - this is because the raw cookie arrives
|
||||
// here in this file but undergoes non-trivial processing
|
||||
// in LLViewerMedia.
|
||||
void LLPluginClassMedia::storeOpenIDCookie(const std::string url,
|
||||
const std::string name, const std::string value,
|
||||
const std::string host, const std::string path,
|
||||
bool httponly, bool secure)
|
||||
{
|
||||
sOIDcookieUrl = url;
|
||||
sOIDcookieName = name;
|
||||
sOIDcookieValue = value;
|
||||
sOIDcookieHost = host;
|
||||
sOIDcookiePath = path;
|
||||
sOIDcookieHttpOnly = httponly;
|
||||
sOIDcookieSecure = secure;
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_cookie");
|
||||
|
|
|
|||
|
|
@ -135,6 +135,20 @@ public:
|
|||
// Text may be unicode (utf8 encoded)
|
||||
bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
|
||||
|
||||
static std::string sOIDcookieUrl;
|
||||
static std::string sOIDcookieName;
|
||||
static std::string sOIDcookieValue;
|
||||
static std::string sOIDcookieHost;
|
||||
static std::string sOIDcookiePath;
|
||||
static bool sOIDcookieHttpOnly;
|
||||
static bool sOIDcookieSecure;
|
||||
void storeOpenIDCookie(const std::string url,
|
||||
const std::string name, const std::string value,
|
||||
const std::string host, const std::string path,
|
||||
bool httponly, bool secure);
|
||||
|
||||
void injectOpenIDCookie();
|
||||
|
||||
void setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure);
|
||||
|
||||
void loadURI(const std::string &uri);
|
||||
|
|
|
|||
|
|
@ -5863,7 +5863,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnableMouselook</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1314,7 +1314,13 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url)
|
|||
// down.
|
||||
std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority));
|
||||
|
||||
media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host, cookie_path, httponly, secure);
|
||||
media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host,
|
||||
cookie_path, httponly, secure);
|
||||
|
||||
// Now that we have parsed the raw cookie, we must store it so that each new media instance
|
||||
// can also get a copy and faciliate logging into internal SL sites.
|
||||
media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value,
|
||||
cookie_host, cookie_path, httponly, secure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1866,6 +1872,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
|
|||
|
||||
if (media_source)
|
||||
{
|
||||
media_source->injectOpenIDCookie();
|
||||
media_source->setDisableTimeout(gSavedSettings.getBOOL("DebugPluginDisableTimeout"));
|
||||
media_source->setLoop(mMediaLoop);
|
||||
media_source->setAutoScale(mMediaAutoScale);
|
||||
|
|
|
|||
|
|
@ -1984,13 +1984,22 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
break;
|
||||
}
|
||||
|
||||
} while (mVoiceEnabled && !mRelogRequested && !sShuttingDown);
|
||||
} while (!sShuttingDown && mVoiceEnabled && !mRelogRequested);
|
||||
|
||||
LL_DEBUGS("Voice")
|
||||
<< "leaving inner waitForChannel loop"
|
||||
<< " RelogRequested=" << mRelogRequested
|
||||
<< " VoiceEnabled=" << mVoiceEnabled
|
||||
<< LL_ENDL;
|
||||
if (!sShuttingDown)
|
||||
{
|
||||
LL_DEBUGS("Voice")
|
||||
<< "leaving inner waitForChannel loop"
|
||||
<< " RelogRequested=" << mRelogRequested
|
||||
<< " VoiceEnabled=" << mVoiceEnabled
|
||||
<< LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if sShuttingDown is set, we already logged out
|
||||
LL_DEBUGS("Voice") << "leaving inner waitForChannel loop." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
mIsProcessingChannels = false;
|
||||
|
||||
|
|
@ -2006,7 +2015,7 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
return false;
|
||||
}
|
||||
}
|
||||
} while (mVoiceEnabled && mRelogRequested && isGatewayRunning() && !sShuttingDown);
|
||||
} while (!sShuttingDown && mVoiceEnabled && mRelogRequested && isGatewayRunning());
|
||||
|
||||
LL_DEBUGS("Voice")
|
||||
<< "exiting"
|
||||
|
|
|
|||
Loading…
Reference in New Issue