Commit ad6b90a9 authored by sspitzer%netscape.com's avatar sspitzer%netscape.com
Browse files

fix for #53970. the "allow at sign" pref is gone. if you were a 4.x user,

we already migrated you fine.  if you are a new user, we trust you to enter
in the right username.  sr=mscott
parent 4b038c73
Loading
Loading
Loading
Loading
+2 −33
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@
#include "nsIMsgWindow.h"
#include "nsIMsgFolder.h" // TO include biffState enum. Change to bool later...

#define PREF_MAIL_ALLOW_AT_SIGN_IN_USER_NAME "mail.allow_at_sign_in_user_name"
#define EXTRA_SAFETY_SPACE 3096

static PRLogModuleInfo *POP3LOGMODULE = nsnull;
@@ -387,8 +386,7 @@ nsPop3Protocol::nsPop3Protocol(nsIURI* aURL)
	m_totalDownloadSize(0),
	m_totalBytesReceived(0),
	m_lineStreamBuffer(nsnull),
	m_pop3ConData(nsnull),
	m_allow_at_sign_in_mail_user_name(PR_FALSE)
	m_pop3ConData(nsnull)
{
	SetLookingForCRLF(MSG_LINEBREAK_LEN == 2);
}
@@ -438,19 +436,6 @@ nsresult nsPop3Protocol::Initialize(nsIURI * aURL)
  if(!m_lineStreamBuffer)
	  return NS_ERROR_OUT_OF_MEMORY;

  NS_WITH_SERVICE(nsIPref, prefs, kPrefServiceCID, &rv);
  if (NS_FAILED(rv)) return rv;

/* the old comment in mkpop3.c in the old source tree:
 *
 * Well, someone finally found a legitimate reason to put an @ in the
 * mail server user name. They're trying to use the user name as a UID
 * in the LDAP directory, and the UIDs happen to have the format
 * foo@bar.com. We don't change our default behavior, but we let admins
 * turn it off if they want
 */
  rv = prefs->GetBoolPref(PREF_MAIL_ALLOW_AT_SIGN_IN_USER_NAME, &m_allow_at_sign_in_mail_user_name);

  mStringService = do_GetService(NS_MSG_POPSTRINGSERVICE_CONTRACTID);
  return rv;
}
@@ -503,22 +488,6 @@ void nsPop3Protocol::SetUsername(const char* name)
	NS_ASSERTION(name, "no name specified!");
	if (name) {
		m_username = name;
		/*
		 * If we are called with data like "fred@bedrock.com", then we will
		 * help the user by ignoring the stuff after the "@".  People with
		 * @ signs in their user names will be hosed.  They also can't possibly
		 * be current happy internet users.  This will waste a few bytes,
		 * but was the minimal change to make in order to ship cheddar.
		 * (it might even save bytes by avoiding the code which does the
		 * right thing)
		 */
		if (!m_allow_at_sign_in_mail_user_name) {
			PRInt32 atPos = -1;
			atPos = m_username.FindChar('@');
			if (atPos != -1) {
				m_username.Truncate(atPos);
			}
		}
    }
}

+0 −1
Original line number Diff line number Diff line
@@ -294,7 +294,6 @@ private:
	
	nsMsgLineStreamBuffer   * m_lineStreamBuffer; // used to efficiently extract lines from the incoming data stream
  Pop3ConData* m_pop3ConData;
  PRBool m_allow_at_sign_in_mail_user_name;
  void FreeMsgInfo();

    //////////////////////////////////////////////////////////////////////////////////////////