diff options
author | Lynx Linden <lynx@lindenlab.com> | 2009-12-15 23:45:38 +0000 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2009-12-15 23:45:38 +0000 |
commit | 931591c0ab434cc330cfdfa324a27278bc4a1270 (patch) | |
tree | 99b7bc88a28b3c1949437c8ebf29bdb040abe39b /indra/newview/llfloatersearch.cpp | |
parent | dec9e56afe404ac8cbf2bacae87062bf091fdab1 (diff) |
EXT-3496: Add a common authentication key for search and home.
Search and the Home sidetray now have their own specific
authentication keys that they support from login.cgi, but they
fallback to a common key as follows:
Search: "search_token", fallback to "auth_token"
Home: "home_sidetray_token", fallback to "auth_token"
Diffstat (limited to 'indra/newview/llfloatersearch.cpp')
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index b197ed0ac6..595d84f9f0 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -131,8 +131,13 @@ void LLFloaterSearch::search(const LLSD &key) subs["QUERY"] = LLURI::escape(search_text); // add the permissions token that login.cgi gave us + // We use "search_token", and fallback to "auth_token" if not present. LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - subs["AUTH_KEY"] = search_token.asString(); + if (search_token.asString().empty()) + { + search_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + subs["AUTH_TOKEN"] = search_token.asString(); // add the user's preferred maturity (can be changed via prefs) std::string maturity; |