#region TraviBlog

I remember when I used to change this tagline on a weekly basis

general.config.obscure_value=13

I was just going through my about:config and I came across a key named general.config.obscure_value with and integer value of 13. WTF could Firefox possibly use that for???

This file is the only result google gives me: nsReadConfig.cpp, and if we skip down to around line #200, this is the block of code:

  // Once the config file is read, we should check that the vendor name
  // is consistent By checking for the vendor name after reading the config
  // file we allow for the preference to be set (and locked) by the creator
  // of the cfg file meaning the file can not be renamed (successfully).
  
  PRInt32 obscureValue = 0;
  (void) prefBranch->GetIntPref("general.config.obscure_value", &obscureValue);
  PR_LOG(MCD, PR_LOG_DEBUG, ("evaluating .cfg file %s with obscureValue %d\n", lockFileName.get(), obscureValue));
  rv = openAndEvaluateJSFile(lockFileName.get(), PR_TRUE, obscureValue, PR_TRUE);
  if (NS_FAILED(rv))
  {
    PR_LOG(MCD, PR_LOG_DEBUG, ("error evaluating .cfg file %s %x\n", lockFileName.get(), rv));
    return rv;
  }
  
  rv = prefBranch->GetCharPref("general.config.filename",
    getter_Copies(lockFileName));
  if (NS_FAILED(rv))
    // There is NO REASON we should ever get here. This is POST reading
    // of the config file.
    return NS_ERROR_FAILURE;

Now I haven't programmed any C++ since my freshman year at RIT, but I can't believe there isn't an easier way to do this.

posted on Monday, November 29, 2004 10:27 PM

Feedback

# Correctly named config value 1/11/2005 11:27 AM Visual ActiveKent Sharkey .NET SE 3.11

# re: general.config.obscure_value=13 1/11/2005 12:02 PM A Non

go RIT tigers!

# general.config.obscure_value=13 2/2/2005 10:29 AM Pingback/TrackBack

# re: general.config.obscure_value=13 6/6/2005 6:57 PM Matthew Gates

Looks like it's a key to a very primitive encryption routing that "scrambles" the config files (this number is subtracted from each character after the file is read).

See the function nsReadConfig::readConfigFile in nsReadConfig.cpp - it's pretty self explanatory.

# re: general.config.obscure_value=13 7/18/2005 1:51 AM John Smith

If you recall NS 4.x had rot-13 support for encoding/decoding emails.

I think you just right-clicked on an incomming message and chose something like "Decode using ROT-13".

# re: general.config.obscure_value=13 7/18/2005 4:34 AM Eq

I think "obscure" in "obscure value" is a verb, not an adjective - i.e. it is a value used for obscuring things (probably ROT13, as the previous poster said).

Leave Comments
if you can read this, your browser sucks.
upgrade:
*firefox* | mozilla | netscape | safari

#endregion