should be able to spoof versions as well now, too

This commit is contained in:
Hazim Gazov
2010-04-28 15:44:27 -03:00
parent 32734e0de3
commit 5c25824144
8 changed files with 100 additions and 51 deletions

View File

@@ -8419,6 +8419,50 @@
<key>Value</key>
<string>Snowglobe</string>
</map>
<key>SpecifiedVersionMaj</key>
<map>
<key>Comment</key>
<string>Client's Major Version</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SpecifiedVersionMin</key>
<map>
<key>Comment</key>
<string>Client's Minor Version</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>4</integer>
</map>
<key>SpecifiedVersionPatch</key>
<map>
<key>Comment</key>
<string>Client's Patch Version</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SpecifiedVersionBuild</key>
<map>
<key>Comment</key>
<string>Client's Build Version</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SpecifiedMAC</key>
<map>
<key>Comment</key>

View File

@@ -595,17 +595,11 @@ bool LLAppViewer::init()
// Build a string representing the current version number.
// <edit> meh
/*
// </edit>
gCurrentVersion = llformat("%s %d.%d.%d.%d",
gSavedSettings.getString("VersionChannelName").c_str(),
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
LL_VERSION_BUILD );
// <edit>
*/
gCurrentVersion = gSavedSettings.getString("SpecifiedChannel");
gCurrentVersion = gSavedSettings.getString("SpecifiedChannel") + " " +
gSavedSettings.getInteger("SpecifiedVersionMaj") + "." +
gSavedSettings.getInteger("SpecifiedVersionMin") + "." +
gSavedSettings.getInteger("SpecifiedVersionPatch") + "." +
gSavedSettings.getInteger("SpecifiedVersionBuild");
// </edit>
//////////////////////////////////////////////////////////////////////////////
@@ -2119,8 +2113,9 @@ bool LLAppViewer::initConfiguration()
void LLAppViewer::checkForCrash(void)
{
#if LL_SEND_CRASH_REPORTS
// <edit> screw sending crash reports
#if LL_SEND_CRASH_REPORTS && 0
// </edit>
//*NOTE:Mani The current state of the crash handler has the MacOSX
// sending all crash reports as freezes, in order to let
// the MacOSX CrashRepoter generate stacks before spawning the
@@ -2323,14 +2318,15 @@ void LLAppViewer::writeSystemInfo()
// <edit>
//gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("SpecifiedChannel");
gDebugInfo["ClientInfo"]["MajorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMaj");
gDebugInfo["ClientInfo"]["MinorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMin");
gDebugInfo["ClientInfo"]["PatchVersion"] = gSavedSettings.getInteger("SpecifiedVersionPatch");
gDebugInfo["ClientInfo"]["BuildVersion"] = gSavedSettings.getInteger("SpecifiedVersionBuild");
// </edit>
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
//need to put in something to lie about this stuff
gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz();
@@ -2361,7 +2357,7 @@ void LLAppViewer::writeSystemInfo()
// Dump some debugging info
LL_INFOS("SystemInfo") << gSecondLife
<< " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
<< " version " << gSavedSettings.getInteger("SpecifiedVersionMaj") << "." << gSavedSettings.getInteger("SpecifiedVersionMin") << "." << gSavedSettings.getInteger("SpecifiedVersionPatch")
<< LL_ENDL;
// Dump the local time and time zone
@@ -2422,12 +2418,12 @@ void LLAppViewer::handleViewerCrash()
// <edit>
//gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("SpecifiedChannel");
// </edit>
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
gDebugInfo["ClientInfo"]["MajorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMaj");
gDebugInfo["ClientInfo"]["MinorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMin");
gDebugInfo["ClientInfo"]["PatchVersion"] = gSavedSettings.getInteger("SpecifiedVersionPatch");
gDebugInfo["ClientInfo"]["BuildVersion"] = gSavedSettings.getInteger("SpecifiedVersionBuild");
// </edit>
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0])
@@ -4088,10 +4084,10 @@ void LLAppViewer::handleLoginComplete()
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("SpecifiedChannel");
// </edit>
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
gDebugInfo["ClientInfo"]["MajorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMaj");
gDebugInfo["ClientInfo"]["MinorVersion"] = gSavedSettings.getInteger("SpecifiedVersionMin");
gDebugInfo["ClientInfo"]["PatchVersion"] = gSavedSettings.getInteger("SpecifiedVersionPatch");
gDebugInfo["ClientInfo"]["BuildVersion"] = gSavedSettings.getInteger("SpecifiedVersionBuild");
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0])

View File

@@ -703,10 +703,10 @@ LLSD LLFloaterReporter::gatherReport()
if ( mReportType == BUG_REPORT)
{
summary << short_platform << " V" << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VIEWER_BUILD
summary << short_platform << " V" << gSavedSettings.getInteger("SpecifiedVersionMaj") << "."
<< gSavedSettings.getInteger("SpecifiedVersionMin") << "."
<< gSavedSettings.getInteger("SpecifiedVersionPatch") << "."
<< gSavedSettings.getInteger("SpecifiedVersionBuild")
<< " (" << regionp->getName() << ")"
<< "[" << category_name << "] "
<< "\"" << childGetValue("summary_edit").asString() << "\"";
@@ -724,10 +724,10 @@ LLSD LLFloaterReporter::gatherReport()
std::ostringstream details;
if (mReportType != BUG_REPORT)
{
details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VIEWER_BUILD << std::endl << std::endl;
details << "V" << gSavedSettings.getInteger("SpecifiedVersionMaj") << "." // client version moved to body of email for abuse reports
<< gSavedSettings.getInteger("SpecifiedVersionMin") << "."
<< gSavedSettings.getInteger("SpecifiedVersionPatch") << "."
<< gSavedSettings.getInteger("SpecifiedVersionBuild") << std::endl << std::endl;
}
std::string object_name = childGetText("object_name");
std::string owner_name = childGetText("owner_name");
@@ -748,9 +748,9 @@ LLSD LLFloaterReporter::gatherReport()
std::string version_string;
version_string = llformat(
"%d.%d.%d %s %s %s %s",
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
gSavedSettings.getInteger("SpecifiedVersionMaj"),
gSavedSettings.getInteger("SpecifiedVersionMin"),
gSavedSettings.getInteger("SpecifiedVersionPatch"),
platform,
gSysCPU.getFamily().c_str(),
gGLManager.mGLRenderer.c_str(),

View File

@@ -1002,12 +1002,12 @@ void LLPanelLogin::loadLoginPage()
{
oStr << "&firstlogin=TRUE";
}
// <edit>
// Channel and Version
std::string version = llformat("%d.%d.%d (%d)",
LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD);
// <edit>
gSavedSettings.getInteger("SpecifiedVersionMaj"), gSavedSettings.getInteger("SpecifiedVersionMin"), gSavedSettings.getInteger("SpecifiedVersionPatch"), gSavedSettings.getInteger("SpecifiedVersionBuild"));
//char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0);
char* curl_channel = curl_escape(gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
// </edit>

View File

@@ -906,9 +906,9 @@ bool idle_startup()
if(!start_messaging_system(
message_template_path,
port,
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
gSavedSettings.getInteger("SpecifiedVersionMaj"),
gSavedSettings.getInteger("SpecifiedVersionMin"),
gSavedSettings.getInteger("SpecifiedVersionPatch"),
FALSE,
std::string(),
responder,

View File

@@ -59,12 +59,14 @@ void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std
std::string url;
getTranslateUrl(url, fromLang, toLang, mesg);
//<edit>
std::string user_agent = llformat("%s %d.%d.%d (%d)",
LL_CHANNEL,
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
LL_VERSION_BUILD );
gSavedSettings.getInteger("SpecifiedChannel"),
gSavedSettings.getInteger("SpecifiedVersionMaj"),
gSavedSettings.getInteger("SpecifiedVersionMin"),
gSavedSettings.getInteger("SpecifiedVersionPatch"),
gSavedSettings.getInteger("SpecifiedVersionBuild") );
//</edit>
if (!m_Header.size())
{

View File

@@ -260,7 +260,7 @@ std::string LLViewerMedia::getCurrentUserAgent()
// http://www.mozilla.org/build/revised-user-agent-strings.html
std::ostringstream codec;
codec << "SecondLife/";
codec << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD;
codec << gSavedSettings.getInteger("SpecifiedVersionMaj") << "." << gSavedSettings.getInteger("SpecifiedVersionMin") << "." << gSavedSettings.getInteger("SpecifiedVersionPatch") << "." << gSavedSettings.getInteger("SpecifiedVersionBuild");
codec << " (" << channel << "; " << skin_name << " skin)";
llinfos << codec.str() << llendl;

View File

@@ -125,4 +125,11 @@
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
height="20" left_delta="64" max_length="32" mouse_opaque="true"
name="id0_edit" select_all_on_focus_received="true" width="320" enabled="false" />
<panel border="true" bottom_delta="0" follows="left|top|right|bottom" height="20"
label="Version" left="1000" name="General" width="270">
BIDOOF
</panel>
</panel>