mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 13:25:00 +00:00
fix escaping of user name (r=alecf) also fix build bustage
This commit is contained in:
parent
9c7d859963
commit
4288f5ddc1
@ -605,7 +605,7 @@ nsMsgAccountManager::SetDefaultAccount(nsIMsgAccount * aDefaultAccount)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsMsgAccountManager::setDefaultAccountPref(nsIMsgAccount* aDefaultAccount)
|
||||
{
|
||||
nsresult rv;
|
||||
|
@ -172,7 +172,8 @@ nsMsgIncomingServer::GetServerURI(char **aResult)
|
||||
if (NS_SUCCEEDED(rv) && ((const char*)username) && username[0]) {
|
||||
nsXPIDLCString escapedUsername;
|
||||
*((char **)getter_Copies(escapedUsername)) =
|
||||
nsEscape(username, url_Path);
|
||||
nsEscape(username, url_XAlphas);
|
||||
// nsEscape(username, url_Path);
|
||||
// not all servers have a username
|
||||
uri += escapedUsername;
|
||||
uri += '@';
|
||||
|
@ -140,8 +140,14 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe
|
||||
|
||||
nsXPIDLCString host;
|
||||
nsXPIDLCString scheme;
|
||||
nsXPIDLCString userName;
|
||||
|
||||
nsresult rv = GetHost(getter_Copies(host));
|
||||
GetUsername(getter_Copies(userName));
|
||||
|
||||
if ((const char *) userName)
|
||||
nsUnescape(NS_CONST_CAST(char*,(const char*)userName));
|
||||
|
||||
rv = GetScheme(getter_Copies(scheme));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
@ -150,7 +156,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||
rv = accountManager->FindServer(GetUserName(),
|
||||
rv = accountManager->FindServer(userName,
|
||||
host,
|
||||
scheme,
|
||||
aIncomingServer);
|
||||
|
Loading…
Reference in New Issue
Block a user