Bug 1708125 - Remove some remaining FTP references from the tree r=necko-reviewers,dragana,Gijs

Differential Revision: https://phabricator.services.mozilla.com/D114067
This commit is contained in:
Valentin Gosu 2021-05-07 08:20:14 +00:00
Родитель f9f919e881
Коммит bf24e6a36f
9 изменённых файлов: 6 добавлений и 46 удалений

Просмотреть файл

@ -202,14 +202,6 @@
<string>https</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>ftp URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>ftp</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>file URL</string>

Просмотреть файл

@ -1130,6 +1130,6 @@ function checkProtocol(img) {
var url = img[COL_IMAGE_ADDRESS];
return (
/^data:image\//i.test(url) ||
/^(https?|ftp|file|about|chrome|resource):/.test(url)
/^(https?|file|about|chrome|resource):/.test(url)
);
}

Просмотреть файл

@ -219,7 +219,6 @@ const kProtocolsWithIcons = [
"about:",
"http:",
"https:",
"ftp:",
];
function iconHelper(url) {
if (typeof url == "string") {

Просмотреть файл

@ -89,7 +89,7 @@ const {
FIXUP_FLAG_FIX_SCHEME_TYPOS,
} = Ci.nsIURIFixup;
const COMMON_PROTOCOLS = ["http", "https", "ftp", "file"];
const COMMON_PROTOCOLS = ["http", "https", "file"];
// Regex used to identify user:password tokens in url strings.
// This is not a strict valid characters check, because we try to fixup this

Просмотреть файл

@ -2513,7 +2513,6 @@ class Document : public nsINode,
return !NodePrincipal()->SchemeIs("http") &&
!NodePrincipal()->SchemeIs("https") &&
!NodePrincipal()->SchemeIs("ftp") &&
!NodePrincipal()->SchemeIs("file");
}

Просмотреть файл

@ -257,8 +257,7 @@ bool ReferrerInfo::IsReferrerSchemeAllowed(nsIURI* aReferrer) {
return false;
}
return scheme.EqualsIgnoreCase("https") || scheme.EqualsIgnoreCase("http") ||
scheme.EqualsIgnoreCase("ftp");
return scheme.EqualsIgnoreCase("https") || scheme.EqualsIgnoreCase("http");
}
/* static */
@ -1199,7 +1198,7 @@ nsresult ReferrerInfo::ComputeReferrer(nsIHttpChannel* aChannel) {
return NS_OK;
}
// Enforce Referrer allowlist, only http, https, ftp scheme are allowed
// Enforce Referrer allowlist, only http, https scheme are allowed
if (!IsReferrerSchemeAllowed(mOriginalReferrer)) {
return NS_OK;
}

Просмотреть файл

@ -154,7 +154,7 @@ class ReferrerInfo : public nsIReferrerInfo {
/**
* Check whether the given referrer's scheme is allowed to be computed and
* sent. The allowlist schemes are: http, https, ftp.
* sent. The allowlist schemes are: http, https.
*/
static bool IsReferrerSchemeAllowed(nsIURI* aReferrer);
@ -368,7 +368,7 @@ class ReferrerInfo : public nsIReferrerInfo {
bool IsPolicyOverrided() { return mOverridePolicyByDefault; }
/*
* Get origin string from a given valid referrer URI (http, https, ftp)
* Get origin string from a given valid referrer URI (http, https)
*
* @aReferrer - the full referrer URI
* @aResult - the resulting aReferrer in string format.

Просмотреть файл

@ -14,9 +14,6 @@
12=Performing a TLS handshake to %1$S…
13=The TLS handshake finished for %1$S…
27=Beginning FTP transaction…
28=Finished FTP transaction
RepostFormData=This web page is being redirected to a new location. Would you like to resend the form data you have typed to the new location?
# Directory listing strings

Просмотреть файл

@ -201,32 +201,6 @@ function run_test() {
info.domain = "";
info.username = "";
info.password = "";
// 5: FTP
var uri2 = NetUtil.newURI("ftp://" + host);
var ftpchan = NetUtil.newChannel({
uri: uri2,
loadUsingSystemPrincipal: true,
});
prompt1 = new Prompt1();
prompt1.rv = expectedRV;
prompt1.scheme = "ftp";
wrapper = adapter.createAdapter(prompt1);
var rv = wrapper.promptAuth(ftpchan, 0, info);
Assert.equal(rv, prompt1.rv);
Assert.equal(prompt1.called, CALLED_PROMPTUP);
if (rv) {
Assert.equal(info.domain, "");
Assert.equal(info.username, prompt1.user);
Assert.equal(info.password, prompt1.pw);
}
info.domain = "";
info.username = "";
info.password = "";
}
do_tests(true);
do_tests(false);