CasperTech / node-metaverse

A node.js interface for Second Life.
MIT License
50 stars 34 forks source link

Random Generation of MAC Address causes SL to Spam Email Notifications in some cases #55

Closed ghost closed 2 years ago

ghost commented 2 years ago

Linden Lab has added in a email notification, whenever you login to SL from what it believes to be a new machine, it bases this seemingly off the MAC Address reported by the client. ( See here)

As Node-metaverse randomly generates one each time it starts, it can cause a lot of email spam notifications.

A Couple Potential Solutions are as follows, I could probably implement it in a pull request if anyone else thinks it's worth doing.

  1. Have it pull the MAC Address of the first network interface from the OS Module and use that.
  2. Have a login parameter that you can specify either a specific network interface you wish to use, defaulting to a random one if not defined in Parameters.
ghost commented 2 years ago

Theoretical Skeleton Written of it.

import { networkInterfaces } from 'os';

/// Assuming this code goes in LoginHandler.ts, it'll have the other functions being called. 
function prepareMAC(string inter){ // Inter defaults to either random or the first public interface.

    const interfaces = networkInterfaces();

    // if interface is set to be random, generate a random MAC and Return. 
    if(interface == "random"){
    return LoginHandler.GenerateMAC();
    }
    else{
      // Iterate through the network interface object until you find a interface matching the name of interface, or if it is undefined, stop at the first one that has internal set to false. 
    }

}
TomMettam commented 2 years ago

I'll change this to generate an ID based on account name. I don't like hidden data leakage.

ghost commented 2 years ago

Sounds good, so perhaps a hash of it?