From ec5012c0a76a606c43e5f9fcf4a959251a503f6d Mon Sep 17 00:00:00 2001 From: David Seikel Date: Thu, 3 Mar 2011 21:50:24 +1000 Subject: Privacy issue - Don't send private data across the 'net. Yes, this makes the meta-impy viewer non compliant with LL's TPVP, we don't care this is a viewer for the meta grid. We care about privacy. We have our own effective methods of implementing bans. --- linden/indra/newview/hippoupdate.cpp | 3 +-- linden/indra/newview/llappviewerlinux.cpp | 2 +- linden/indra/newview/llappviewermacosx.cpp | 22 +--------------------- linden/indra/newview/llappviewerwin32.cpp | 24 ++---------------------- linden/indra/newview/llstartup.cpp | 6 +++--- linden/indra/newview/llviewerstats.cpp | 4 +--- 6 files changed, 9 insertions(+), 52 deletions(-) diff --git a/linden/indra/newview/hippoupdate.cpp b/linden/indra/newview/hippoupdate.cpp index 192e3d7..2ebcb48 100644 --- a/linden/indra/newview/hippoupdate.cpp +++ b/linden/indra/newview/hippoupdate.cpp @@ -28,8 +28,7 @@ bool HippoUpdate::checkUpdate() // get mac address char macAddress[18]; - sprintf(macAddress, "%02x:%02x:%02x:%02x:%02x:%02x", - gMACAddress[0], gMACAddress[1], gMACAddress[2], gMACAddress[3], gMACAddress[4], gMACAddress[5]); + sprintf(macAddress, "%02x:%02x:%02x:%02x:%02x:%02x", 0, 1, 2, 3, 4, 5); // Not sending private info acress the 'net. Screw LL. // build URL for update check char url[1000]; diff --git a/linden/indra/newview/llappviewerlinux.cpp b/linden/indra/newview/llappviewerlinux.cpp index 88ddf7e..eb713b8 100644 --- a/linden/indra/newview/llappviewerlinux.cpp +++ b/linden/indra/newview/llappviewerlinux.cpp @@ -741,7 +741,7 @@ std::string LLAppViewerLinux::generateSerialNumber() char serial_md5[MD5HEX_STR_SIZE]; serial_md5[0] = 0; - // TODO + // Don't do anything, serious privacy breach to leak internal identifying numbers out to the 'net. return serial_md5; } diff --git a/linden/indra/newview/llappviewermacosx.cpp b/linden/indra/newview/llappviewermacosx.cpp index 5496e5b..ee4648f 100644 --- a/linden/indra/newview/llappviewermacosx.cpp +++ b/linden/indra/newview/llappviewermacosx.cpp @@ -419,27 +419,7 @@ std::string LLAppViewerMacOSX::generateSerialNumber() char serial_md5[MD5HEX_STR_SIZE]; // Flawfinder: ignore serial_md5[0] = 0; - // JC: Sample code from http://developer.apple.com/technotes/tn/tn1103.html - CFStringRef serialNumber = NULL; - io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, - IOServiceMatching("IOPlatformExpertDevice")); - if (platformExpert) { - serialNumber = (CFStringRef) IORegistryEntryCreateCFProperty(platformExpert, - CFSTR(kIOPlatformSerialNumberKey), - kCFAllocatorDefault, 0); - IOObjectRelease(platformExpert); - } - - if (serialNumber) - { - char buffer[MAX_STRING]; // Flawfinder: ignore - if (CFStringGetCString(serialNumber, buffer, MAX_STRING, kCFStringEncodingASCII)) - { - LLMD5 md5( (unsigned char*)buffer ); - md5.hex_digest(serial_md5); - } - CFRelease(serialNumber); - } + // Don't do anything, serious privacy breach to leak internal identifying numbers out to the 'net. return serial_md5; } diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index 6f67c3f..cba7174 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp @@ -600,27 +600,7 @@ std::string LLAppViewerWin32::generateSerialNumber() char serial_md5[MD5HEX_STR_SIZE]; // Flawfinder: ignore serial_md5[0] = 0; - DWORD serial = 0; - DWORD flags = 0; - BOOL success = GetVolumeInformation( - L"C:\\", - NULL, // volume name buffer - 0, // volume name buffer size - &serial, // volume serial - NULL, // max component length - &flags, // file system flags - NULL, // file system name buffer - 0); // file system name buffer size - if (success) - { - LLMD5 md5; - md5.update( (unsigned char*)&serial, sizeof(DWORD)); - md5.finalize(); - md5.hex_digest(serial_md5); - } - else - { - llwarns << "GetVolumeInformation failed" << llendl; - } + // Don't do anything, serious privacy breach to leak internal identifying numbers out to the 'net. + return serial_md5; } diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 78e560e..32aba13 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -1236,7 +1236,7 @@ bool idle_startup() char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ LLMD5 hashed_mac; - hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); + hashed_mac.update( (const unsigned char*) "012345", MAC_ADDRESS_BYTES ); // Nope, LL ain't getting our MAC, and meta7 does not need it. hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); @@ -3052,7 +3052,7 @@ std::string LLStartUp::loadPasswordFromDisk() fclose(fp); // Decipher with MAC address - LLXORCipher cipher(gMACAddress, 6); + LLXORCipher cipher(gMACAddress, 6); // The one and only legitimate use of the users MAC. cipher.decrypt(buffer, HASHED_LENGTH); buffer[HASHED_LENGTH] = '\0'; @@ -3104,7 +3104,7 @@ void LLStartUp::savePasswordToDisk(const std::string& hashed_password) LLStringUtil::copy((char*)buffer, hashed_password.c_str(), HASHED_LENGTH+1); - LLXORCipher cipher(gMACAddress, 6); + LLXORCipher cipher(gMACAddress, 6); // The one and only legitimate use of the users MAC. cipher.encrypt(buffer, HASHED_LENGTH); if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1) diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index 607f871..a7bbee8 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp @@ -714,9 +714,7 @@ void send_stats() system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB(); system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); - std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", - gMACAddress[0],gMACAddress[1],gMACAddress[2], - gMACAddress[3],gMACAddress[4],gMACAddress[5]); + std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", 0,1,2,3,4,5); // Hell no don't seand the MAC across the 'net. Bad LL. system["mac_address"] = macAddressString; system["serial_number"] = LLAppViewer::instance()->getSerialNumber(); std::string gpu_desc = llformat( -- cgit v1.1