diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 0f3ff1110..c7fd988bd 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -974,37 +974,6 @@ void CAudioMixerUser::buildSampleBankList() CPath::addSearchPath(sbp); } -/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. -std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) -{ - CGroupControllerRoot *tempRoot = NULL; - if (!CGroupControllerRoot::isInitialized()) - tempRoot = new CGroupControllerRoot(); - std::string dir = CPath::standardizePath(packedSheetDir, true); - CSoundBank *soundBank = new CSoundBank(); - soundBank->load(dir, true); - delete soundBank; - delete tempRoot; - return dir + "sounds.packed_sheets"; -} - -/// Build the cluster sound_group sheets. -std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - CClusteredSound::buildSheets(dir); - return dir + "sound_groups.packed_sheets"; -} - -/// Build the user var binding sheets. -std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - std::map container; - ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); - return dir + "user_var_binding.packed_sheets"; -} - void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName) { if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS) @@ -1144,6 +1113,37 @@ void CAudioMixerUser::initUserVar() } +/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. +std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) +{ + CGroupControllerRoot *tempRoot = NULL; + if (!CGroupControllerRoot::isInitialized()) + tempRoot = new CGroupControllerRoot(); + std::string dir = CPath::standardizePath(packedSheetDir, true); + CSoundBank *soundBank = new CSoundBank(); + soundBank->load(dir, true); + delete soundBank; + delete tempRoot; + return dir + "sounds.packed_sheets"; +} + +/// Build the cluster sound_group sheets. +std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + CClusteredSound::buildSheets(dir); + return dir + "sound_groups.packed_sheets"; +} + +/// Build the user var binding sheets. +std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + std::map container; + ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); + return dir + "user_var_binding.packed_sheets"; +} + // ****************************************************************** void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 77af4b7ef..a55d6fac0 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -41,15 +41,18 @@ Gamma_max = 1.0; Application = { "ryzom_open", "./client_ryzom_r.exe", "./" }; BackgroundDownloader = 0; -SignUpURL = ""; -StartupHost = "shard.ryzomcore.org:40916"; +SignUpURL = "https://open.ryzom.dev/ams/?page=register"; +StartupHost = "https://open.ryzom.dev"; StartupPage = "/login/r2_login.php"; -InstallStatsUrl = "http://open.ryzom.com:50000/stats/stats.php"; -CreateAccountURL = "http://shard.ryzomcore.org/ams/?page=register"; -EditAccountURL = "http://shard.ryzomcore.org/ams/?page=settings"; +StartupVerify = 1; + +InstallStatsUrl = "https://open.ryzom.dev/stats/stats.php"; +CreateAccountURL = "https://open.ryzom.dev/ams/?page=register"; +EditAccountURL = "https://open.ryzom.dev/ams/?page=settings"; ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html"; -ForgetPwdURL = "http://shard.ryzomcore.org/ams/?page=forgot_password"; -LoginSupportURL = "https://plus.google.com/u/0/communities/103798956862568269036"; +ForgetPwdURL = "https://open.ryzom.dev/ams/?page=forgot_password"; +LoginSupportURL = "https://open.ryzom.dev/ams/"; +NamingPolicyURL = "https://open.ryzom.dev/ams/"; InstallWebPage = ""; // Full path and filename where cURL can find certificate bundle file @@ -90,12 +93,12 @@ XMLOutGameInterfaceFiles = { TexturesInterface = "texture_interfaces_v3"; TexturesInterfaceDXTC = "texture_interfaces_dxtc"; - // The ligo primitive class file LigoPrimitiveClass = "world_editor_classes.xml"; VerboseLog = 1; + /////////// // MOUSE // /////////// @@ -600,11 +603,10 @@ HelpPages = // interval in minutes for webig notify thread to run WebIgNotifInterval = 10; -WebIgMainDomain = "app.ryzom.com"; +WebIgMainDomain = "https://open.ryzom.dev"; WebIgTrustedDomains = { - "api.ryzom.com", "app.ryzom.com" + "open.ryzom.dev" }; -PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; SelectedSlot = 0; diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 37cb36279..69559e0e8 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -317,6 +317,10 @@ int main(int argc, char **argv) LoginCustomParameters = "&steam_auth_session_ticket=" + steamClient.getAuthSessionTicket(); #endif +#if !FINAL_VERSION + LoginCustomParameters += "&dbg=1"; +#endif + // initialize patch manager and set the ryzom full path, before it's used CPatchManager *pPM = CPatchManager::getInstance(); pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName()); diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 85a22e94c..67b40de60 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -321,15 +321,9 @@ CClientConfig::CClientConfig() TexturesLoginInterface.push_back("texture_interfaces_v3_login"); DisplayAccountButtons = true; -#ifdef RYZOM_FORGE - CreateAccountURL = "https://account.ryzom.com/signup/from_client.php"; - EditAccountURL = "https://account.ryzom.com/payment_profile/index.php"; - ForgetPwdURL = "https://account.ryzom.com/payment_profile/lost_secure_password.php"; -#else CreateAccountURL = "https://classic.ryzom.dev/signup/from_client.php"; EditAccountURL = "https://classic.ryzom.dev/payment_profile/index.php"; ForgetPwdURL = "https://classic.ryzom.dev/payment_profile/lost_secure_password.php"; -#endif Position = CVector(0.f, 0.f, 0.f); // Default Position. Heading = CVector(0.f, 1.f, 0.f); // Default Heading. EyesHeight = 1.5f; // Default User Eyes Height. @@ -425,15 +419,15 @@ CClientConfig::CClientConfig() PatchletUrl.clear(); PatchVersion.clear(); - WebIgMainDomain = "classic.ryzom.dev"; - WebIgTrustedDomains.push_back(WebIgMainDomain); + WebIgMainDomain = "https://classic.ryzom.dev"; + WebIgTrustedDomains.push_back("classic.ryzom.dev"); WebIgNotifInterval = 10; // time in minutes CurlMaxConnections = 5; CurlCABundle.clear(); - RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php"; - ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php"; + RingReleaseNotePath = WebIgMainDomain + "/releasenotes_ring/index.php"; + ReleaseNotePath = WebIgMainDomain + "/releasenotes/index.php"; /////////////// @@ -449,7 +443,7 @@ CClientConfig::CClientConfig() SoundOn = true; // Default is with sound. DriverSound = SoundDrvAuto; SoundForceSoftwareBuffer = true; - SoundOutGameMusic = "Main Menu Loop.ogg"; + SoundOutGameMusic = "main menu loop.ogg"; SoundSFXVolume = 1.f; SoundGameMusicVolume = 1.f; SoundTPFade = 500; @@ -1092,6 +1086,9 @@ void CClientConfig::setValues() /////////// // WEBIG // READ_STRING_FV(WebIgMainDomain); + if (ClientCfg.WebIgMainDomain.find("http://") == std::string::npos + || ClientCfg.WebIgMainDomain.find("https://") == std::string::npos) + ClientCfg.WebIgMainDomain = "http://" + ClientCfg.WebIgMainDomain; READ_STRINGVECTOR_FV(WebIgTrustedDomains); READ_INT_FV(WebIgNotifInterval); READ_INT_FV(CurlMaxConnections); diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 16436516b..c27672489 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -63,7 +63,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p return true; } -static const std::string CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA" +static const std::string CAFilename = "cacert.pem"; // https://curl.haxx.se/docs/caextract.html // *************************************************************************** bool CCurlHttpClient::verifyServer(bool verify) diff --git a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp index 68b55076e..bf83ddce1 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp @@ -416,7 +416,7 @@ class CAHUIShowHide : public IActionHandler nlwarning("%s is not a group html", window.c_str()); return; } - pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/index.php?app="+webapp); + pGH->setURL(ClientCfg.WebIgMainDomain + "/index.php?app=" + webapp); } } else diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 8f5c6da01..11fe6c6c5 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -267,7 +267,7 @@ public: uint c = 0; while (_Running) { - string url = "https://"+domain+"/index.php?app=notif&format=lua&rnd="+randomString(); + string url = domain + "/index.php?app=notif&format=lua&rnd=" + randomString(); addWebIGParams(url, true); get(url); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 5265f801e..ff3b32a22 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -156,7 +156,8 @@ CLoginStateMachine LoginSM; bool CStartupHttpClient::connectToLogin() { - return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)); + return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)) + && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); } CStartupHttpClient HttpClient; @@ -2827,7 +2828,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 62)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res1: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 64)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2880,7 +2910,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 65)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2962,7 +3021,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -3067,7 +3155,36 @@ string selectShard(uint32 shardId, string &cookie, string &addr) if(res.empty()) return "Empty result (error code 13)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index 2c6e8c960..fa4f041c1 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -19,7 +19,7 @@ #define CL_LOGIN_H #include "nel/misc/types_nl.h" -#include "game_share/http_client.h" +#include "http_client_curl.h" #include #include @@ -74,7 +74,7 @@ extern sint32 ShardSelected; /* * HTTP client preconfigured to connect to the startup login host */ -class CStartupHttpClient : public CHttpClient +class CStartupHttpClient : public CCurlHttpClient { public: diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index d8ccbc263..26d58cb81 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3290,7 +3290,7 @@ private: if(i != digitMaxEnd) { ucstring web_app = contentStr.substr(digitStart, i-digitStart); - contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/")+web_app+ucstring("/index.php?")+contentStr.substr(i+1); + contentStr = ucstring(ClientCfg.WebIgMainDomain + "/") + web_app + ucstring("/index.php?") + contentStr.substr((size_t)i + 1); } else {