mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-13 03:10:10 +01:00
allow accessing non-standard port of gopher by toggling network.gopher.port-restricted to false (default: true)
This commit is contained in:
parent
50d79f4b2e
commit
ee63982def
@ -2390,3 +2390,6 @@ pref("print.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+'-d '}${MOZ_PRINTER_NA
|
||||
#ifdef MOZ_X11
|
||||
pref("network.gnomevfs.supported-protocols", "smb:,sftp:");
|
||||
#endif
|
||||
|
||||
// restrict gopher port to port 70 only
|
||||
pref("network.gopher.port-restricted", true);
|
||||
|
@ -122,13 +122,21 @@ nsGopherChannel::Init(nsIURI* uri, nsIProxyInfo* proxyInfo)
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
PRBool restrictedPort = PR_TRUE;
|
||||
nsCOMPtr<nsIPrefBranch> branch;
|
||||
nsCOMPtr<nsIPrefService> prefs = do_GetService("@mozilla.org/preferences-service;1", &rv);
|
||||
if (!NS_FAILED(rv)) {
|
||||
branch = do_QueryInterface(prefs);
|
||||
|
||||
branch->GetBoolPref("network.gopher.port-restricted" , &restrictedPort);
|
||||
}
|
||||
// For security reasons, don't allow anything expect the default
|
||||
// gopher port (70). See bug 71916 - bbaetz@cs.mcgill.ca
|
||||
/*
|
||||
if (mPort==-1)
|
||||
if(!restrictedPort) {
|
||||
if (mPort==-1)
|
||||
mPort=GOPHER_PORT;
|
||||
} else
|
||||
mPort=GOPHER_PORT;
|
||||
*/
|
||||
mPort=GOPHER_PORT;
|
||||
|
||||
// No path given
|
||||
if (buffer[0]=='\0' || (buffer[0]=='/' && buffer[1]=='\0')) {
|
||||
|
Loading…
Reference in New Issue
Block a user