mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-10 18:00:15 +01:00
Merge pull request #32 from roytam1/relex-gopher-port-restriction-pref
allow accessing non-standard port of gopher
This commit is contained in:
commit
437c53a136
@ -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,12 +122,20 @@ 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(!restrictedPort) {
|
||||
if (mPort==-1)
|
||||
mPort=GOPHER_PORT;
|
||||
*/
|
||||
} else
|
||||
mPort=GOPHER_PORT;
|
||||
|
||||
// No path given
|
||||
|
@ -376,7 +376,7 @@ nsIndexedToHTML::DoOnStartRequest(nsIRequest* request, nsISupports *aContext,
|
||||
|
||||
buffer.AppendLiteral("<style type=\"text/css\">\n"
|
||||
"img { border: 0; padding: 0 2px; vertical-align: text-bottom; }\n"
|
||||
"td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; white-space: pre; }\n"
|
||||
"td { font-family: monospace; padding: 2px 3px; text-align: right; vertical-align: bottom; white-space: -moz-pre-wrap; }\n"
|
||||
"td:first-child { text-align: left; padding: 2px 10px 2px 3px; }\n"
|
||||
"table { border: 0; }\n"
|
||||
"a.symlink { font-style: italic; }\n"
|
||||
|
Loading…
Reference in New Issue
Block a user