From b12dd38c57fd9b047382e6e2d80b26f36888eb39 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Thu, 26 Aug 2021 15:55:30 -0700 Subject: SL-15867 User not logged in - very much the MVS (minimum viable solution) but by storing the OpenID cookie when it arrives then injecting it forcefully into each new media instance, it appears that the 'not logged in' problem is solved - at least in my testing, 20+ times logging in without a cache and profiles, dashboard etc. were all logged in - QA will confirm. The full solution involves providing a separate cache for each media instance and tightening up the CEF cookie calling code - that is a large project and this is sufficient for now --- indra/newview/llviewermedia.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d35dbda907..d0cf8ea407 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1290,7 +1290,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); } } } @@ -1825,6 +1831,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); -- cgit v1.2.3