From fe71dd340ab396b93bde45df438041af5d85fd47 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 1 Feb 2010 15:10:19 -0800 Subject: Merge giab-viewer-trunk 2497, general merge of more secapi stuff as well as certificate handling stuff. Grid manager as well --- indra/newview/lllogininstance.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 24c72c65ce..bb45cc93ea 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -55,6 +55,7 @@ #if LL_LINUX || LL_SOLARIS #include "lltrans.h" #endif +#include "llsecapi.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -83,14 +84,14 @@ LLLoginInstance::~LLLoginInstance() { } -void LLLoginInstance::connect(const LLSD& credentials) +void LLLoginInstance::connect(LLPointer credentials) { std::vector uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); connect(uris.front(), credentials); } -void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials) +void LLLoginInstance::connect(const std::string& uri, LLPointer credentials) { mAttemptComplete = false; // Reset attempt complete at this point! constructAuthParams(credentials); @@ -102,7 +103,7 @@ void LLLoginInstance::reconnect() // Sort of like connect, only using the pre-existing // request params. std::vector uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); mLoginModule->connect(uris.front(), mRequestData); } @@ -118,7 +119,7 @@ LLSD LLLoginInstance::getResponse() return mResponseData; } -void LLLoginInstance::constructAuthParams(const LLSD& credentials) +void LLLoginInstance::constructAuthParams(LLPointer user_credential) { // Set up auth request options. //#define LL_MINIMIAL_REQUESTED_OPTIONS @@ -155,20 +156,18 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.append("god-connect"); } + + // (re)initialize the request params with creds. + LLSD request_params = user_credential->getLoginParams(); char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ LLMD5 hashed_mac; - hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); - - // prepend "$1$" to the password to indicate its the md5'd version. - std::string dpasswd("$1$"); - dpasswd.append(credentials["passwd"].asString()); - - // (re)initialize the request params with creds. - LLSD request_params(credentials); - request_params["passwd"] = dpasswd; + request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in -- cgit v1.2.3 From 9e89819d55a3b6ee7fc56f3efb36f273e4e05c83 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 8 Jul 2009 00:45:17 +0000 Subject: DEV-34822 - merge with 1.23 certificate notification code -r 118191 ignore-dead-branch --- indra/newview/lllogininstance.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index bb45cc93ea..e4b8becdd7 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -246,6 +246,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LLSD data(LLSD::emptyMap()); data["message"] = message_response; data["reply_pump"] = TOS_REPLY_PUMP; + if(response.has("error_code")) + { + data["error_code"] = response["error_code"]; + } + if(response.has("certificate")) + { + data["certificate"] = response["certificate"]; + } + LLFloaterReg::showInstance("message_critical", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, -- cgit v1.2.3 From 7a64aad1def1b0612addbf2e66c66db061d7e182 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Thu, 9 Jul 2009 20:56:23 +0000 Subject: DEV-34822 - merge 1.23 merge -r119443 - basic slurl handling ignore dead branch --- indra/newview/lllogininstance.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index e4b8becdd7..04e5cef62e 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -48,7 +48,8 @@ // newview #include "llviewernetwork.h" #include "llviewercontrol.h" -#include "llurlsimstring.h" +#include "llslurl.h" +#include "llstartup.h" #include "llfloaterreg.h" #include "llnotifications.h" #include "llwindow.h" @@ -56,6 +57,7 @@ #include "lltrans.h" #endif #include "llsecapi.h" +#include "llstartup.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -462,15 +464,17 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& std::string construct_start_string() { std::string start; - if (LLURLSimString::parse()) + LLSLURL start_slurl = LLStartUp::getStartSLURL(); + if (start_slurl.getType() == LLSLURL::LOCATION) { // a startup URL was specified + LLVector3 position = start_slurl.getPosition(); std::string unescaped_start = STRINGIZE( "uri:" - << LLURLSimString::sInstance.mSimName << "&" - << LLURLSimString::sInstance.mX << "&" - << LLURLSimString::sInstance.mY << "&" - << LLURLSimString::sInstance.mZ); + << start_slurl.getRegion() << "&" + << position[VX] << "&" + << position[VY] << "&" + << position[VZ]); start = xml_escape_string(unescaped_start); } else -- cgit v1.2.3 From ff52ac089f9ed67410f80fe66d0b997f0f2dafcc Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 15 Jul 2009 21:50:42 +0000 Subject: DEV-34822 viewer 1.23 merge DEV-32649 Merge the diamondware/vivox voice code -r124876 -r125220 --- indra/newview/lllogininstance.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 04e5cef62e..c58a220ee8 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -150,6 +150,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("buddy-list"); requested_options.append("ui-config"); #endif + requested_options.append("voice-config"); requested_options.append("tutorial_setting"); requested_options.append("login-flags"); requested_options.append("global-textures"); -- cgit v1.2.3 From 3fca923949667d1c713119043cd4aaeae4acfe09 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 29 Mar 2010 11:58:31 -0700 Subject: Fix initial outfit selection dialog to choose initial outfit based on what's passed up from login.cgi instead of just using hardcoded values. If nothing is passed up, it defaults to values in settings.xml --- indra/newview/lllogininstance.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index df7aa6f79d..0459c85050 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -148,6 +148,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("adult_compliant"); //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); + requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif requested_options.append("voice-config"); -- cgit v1.2.3 From 0bb3f144c0a6712a269246975635962b3b5f48d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 7 Apr 2010 10:37:07 +0100 Subject: Backed out changeset 63b699f90efd --- indra/newview/lllogininstance.cpp | 77 ++++++++++++++------------------------- 1 file changed, 27 insertions(+), 50 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 0459c85050..24c72c65ce 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -48,16 +48,13 @@ // newview #include "llviewernetwork.h" #include "llviewercontrol.h" -#include "llslurl.h" -#include "llstartup.h" +#include "llurlsimstring.h" #include "llfloaterreg.h" #include "llnotifications.h" #include "llwindow.h" #if LL_LINUX || LL_SOLARIS #include "lltrans.h" #endif -#include "llsecapi.h" -#include "llstartup.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -86,14 +83,14 @@ LLLoginInstance::~LLLoginInstance() { } -void LLLoginInstance::connect(LLPointer credentials) +void LLLoginInstance::connect(const LLSD& credentials) { std::vector uris; - LLGridManager::getInstance()->getLoginURIs(uris); + LLViewerLogin::getInstance()->getLoginURIs(uris); connect(uris.front(), credentials); } -void LLLoginInstance::connect(const std::string& uri, LLPointer credentials) +void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials) { mAttemptComplete = false; // Reset attempt complete at this point! constructAuthParams(credentials); @@ -105,7 +102,7 @@ void LLLoginInstance::reconnect() // Sort of like connect, only using the pre-existing // request params. std::vector uris; - LLGridManager::getInstance()->getLoginURIs(uris); + LLViewerLogin::getInstance()->getLoginURIs(uris); mLoginModule->connect(uris.front(), mRequestData); } @@ -121,7 +118,7 @@ LLSD LLLoginInstance::getResponse() return mResponseData; } -void LLLoginInstance::constructAuthParams(LLPointer user_credential) +void LLLoginInstance::constructAuthParams(const LLSD& credentials) { // Set up auth request options. //#define LL_MINIMIAL_REQUESTED_OPTIONS @@ -148,10 +145,8 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("adult_compliant"); //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); - requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif - requested_options.append("voice-config"); requested_options.append("tutorial_setting"); requested_options.append("login-flags"); requested_options.append("global-textures"); @@ -160,18 +155,20 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.append("god-connect"); } - - // (re)initialize the request params with creds. - LLSD request_params = user_credential->getLoginParams(); char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ LLMD5 hashed_mac; - unsigned char MACAddress[MAC_ADDRESS_BYTES]; - LLUUID::getNodeID(MACAddress); - hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); + hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); - + + // prepend "$1$" to the password to indicate its the md5'd version. + std::string dpasswd("$1$"); + dpasswd.append(credentials["passwd"].asString()); + + // (re)initialize the request params with creds. + LLSD request_params(credentials); + request_params["passwd"] = dpasswd; request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in @@ -250,15 +247,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LLSD data(LLSD::emptyMap()); data["message"] = message_response; data["reply_pump"] = TOS_REPLY_PUMP; - if(response.has("error_code")) - { - data["error_code"] = response["error_code"]; - } - if(response.has("certificate")) - { - data["certificate"] = response["certificate"]; - } - LLFloaterReg::showInstance("message_critical", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, @@ -466,31 +454,20 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& std::string construct_start_string() { std::string start; - LLSLURL start_slurl = LLStartUp::getStartSLURL(); - switch(start_slurl.getType()) + if (LLURLSimString::parse()) { - case LLSLURL::LOCATION: - { - // a startup URL was specified - LLVector3 position = start_slurl.getPosition(); - std::string unescaped_start = + // a startup URL was specified + std::string unescaped_start = STRINGIZE( "uri:" - << start_slurl.getRegion() << "&" - << position[VX] << "&" - << position[VY] << "&" - << position[VZ]); - start = xml_escape_string(unescaped_start); - break; - } - case LLSLURL::HOME_LOCATION: - { - start = "home"; - break; - } - default: - { - start = "last"; - } + << LLURLSimString::sInstance.mSimName << "&" + << LLURLSimString::sInstance.mX << "&" + << LLURLSimString::sInstance.mY << "&" + << LLURLSimString::sInstance.mZ); + start = xml_escape_string(unescaped_start); + } + else + { + start = gSavedSettings.getString("LoginLocation"); } return start; } -- cgit v1.2.3 From 0da8fb6035f69399468f0085cd967f90efa91c40 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Fri, 9 Apr 2010 09:26:31 -0400 Subject: Change comment that wasn't updated with the code. No functionality changes. --- indra/newview/lllogininstance.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 24c72c65ce..454fd29fdc 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -352,20 +352,18 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg) payload["mandatory"] = mandatory; /* - We're constructing one of the following 6 strings here: + We're constructing one of the following 9 strings here: "DownloadWindowsMandatory" "DownloadWindowsReleaseForDownload" "DownloadWindows" "DownloadMacMandatory" "DownloadMacReleaseForDownload" "DownloadMac" + "DownloadLinuxMandatory" + "DownloadLinuxReleaseForDownload" + "DownloadLinux" I've called them out explicitly in this comment so that they can be grepped for. - - Also, we assume that if we're not Windows we're Mac. If we ever intend to support - Linux with autoupdate, this should be an explicit #elif LL_DARWIN, but - we'd rather deliver the wrong message than no message, so until Linux is supported - we'll leave it alone. */ std::string notification_name = "Download"; -- cgit v1.2.3