OLD | NEW |
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 /* vim:set ts=4 sw=4 sts=4 et cindent: */ | 2 /* vim:set ts=4 sw=4 sts=4 et cindent: */ |
3 /* This Source Code Form is subject to the terms of the Mozilla Public | 3 /* This Source Code Form is subject to the terms of the Mozilla Public |
4 * License, v. 2.0. If a copy of the MPL was not distributed with this | 4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | 6 |
7 #include "nsAboutRedirector.h" | 7 #include "nsAboutRedirector.h" |
8 #include "nsNetUtil.h" | 8 #include "nsNetUtil.h" |
9 #include "nsAboutProtocolUtils.h" | 9 #include "nsAboutProtocolUtils.h" |
10 #include "mozilla/ArrayUtils.h" | 10 #include "mozilla/ArrayUtils.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 unless your about: page really needs chrome privileges. Security review is | 25 unless your about: page really needs chrome privileges. Security review is |
26 required before adding new map entries without | 26 required before adding new map entries without |
27 URI_SAFE_FOR_UNTRUSTED_CONTENT. Also note, however, that adding | 27 URI_SAFE_FOR_UNTRUSTED_CONTENT. Also note, however, that adding |
28 URI_SAFE_FOR_UNTRUSTED_CONTENT will allow random web sites to link to that | 28 URI_SAFE_FOR_UNTRUSTED_CONTENT will allow random web sites to link to that |
29 URI. Perhaps we should separate the two concepts out... | 29 URI. Perhaps we should separate the two concepts out... |
30 */ | 30 */ |
31 static RedirEntry kRedirMap[] = { | 31 static RedirEntry kRedirMap[] = { |
32 { "", "chrome://global/content/about.xhtml", | 32 { "", "chrome://global/content/about.xhtml", |
33 nsIAboutModule::ALLOW_SCRIPT }, | 33 nsIAboutModule::ALLOW_SCRIPT }, |
34 { "about", "chrome://global/content/aboutAbout.xhtml", 0 }, | 34 { "about", "chrome://global/content/aboutAbout.xhtml", 0 }, |
| 35 /* |
| 36 Removed as part of https://issues.adblockplus.org/ticket/2531 |
35 { "credits", "http://www.mozilla.org/credits/", | 37 { "credits", "http://www.mozilla.org/credits/", |
36 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, | 38 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, |
37 { "mozilla", "chrome://global/content/mozilla.xhtml", | 39 { "mozilla", "chrome://global/content/mozilla.xhtml", |
38 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, | 40 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, |
| 41 */ |
39 { "plugins", "chrome://global/content/plugins.html", 0 }, | 42 { "plugins", "chrome://global/content/plugins.html", 0 }, |
40 { "config", "chrome://global/content/config.xul", 0 }, | 43 { "config", "chrome://global/content/config.xul", 0 }, |
41 #ifdef MOZ_CRASHREPORTER | 44 #ifdef MOZ_CRASHREPORTER |
42 { "crashes", "chrome://global/content/crashes.xhtml", 0 }, | 45 { "crashes", "chrome://global/content/crashes.xhtml", 0 }, |
43 #endif | 46 #endif |
44 { "logo", "chrome://branding/content/about.png", | 47 { "logo", "chrome://branding/content/about.png", |
45 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, | 48 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, |
46 { "buildconfig", "chrome://global/content/buildconfig.html", | 49 { "buildconfig", "chrome://global/content/buildconfig.html", |
47 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, | 50 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, |
| 51 /* |
| 52 Removed as part of https://issues.adblockplus.org/ticket/2531 |
48 { "license", "chrome://global/content/license.html", | 53 { "license", "chrome://global/content/license.html", |
49 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, | 54 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, |
| 55 */ |
50 { "neterror", "chrome://global/content/netError.xhtml", | 56 { "neterror", "chrome://global/content/netError.xhtml", |
51 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | | 57 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | |
52 nsIAboutModule::ALLOW_SCRIPT | | 58 nsIAboutModule::ALLOW_SCRIPT | |
53 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, | 59 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, |
54 { "compartments", "chrome://global/content/aboutCompartments.xhtml", | 60 { "compartments", "chrome://global/content/aboutCompartments.xhtml", |
55 nsIAboutModule::ALLOW_SCRIPT | | 61 nsIAboutModule::ALLOW_SCRIPT | |
56 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, | 62 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, |
57 { "memory", "chrome://global/content/aboutMemory.xhtml", | 63 { "memory", "chrome://global/content/aboutMemory.xhtml", |
58 nsIAboutModule::ALLOW_SCRIPT }, | 64 nsIAboutModule::ALLOW_SCRIPT }, |
| 65 /* |
| 66 Removed as part of https://issues.adblockplus.org/ticket/2531 |
59 { "addons", "chrome://mozapps/content/extensions/extensions.xul", | 67 { "addons", "chrome://mozapps/content/extensions/extensions.xul", |
60 nsIAboutModule::ALLOW_SCRIPT }, | 68 nsIAboutModule::ALLOW_SCRIPT }, |
| 69 */ |
61 { "newaddon", "chrome://mozapps/content/extensions/newaddon.xul", | 70 { "newaddon", "chrome://mozapps/content/extensions/newaddon.xul", |
62 nsIAboutModule::ALLOW_SCRIPT | | 71 nsIAboutModule::ALLOW_SCRIPT | |
63 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, | 72 nsIAboutModule::HIDE_FROM_ABOUTABOUT }, |
| 73 /* |
| 74 Removed as part of https://issues.adblockplus.org/ticket/2531 |
64 { "support", "chrome://global/content/aboutSupport.xhtml", | 75 { "support", "chrome://global/content/aboutSupport.xhtml", |
65 nsIAboutModule::ALLOW_SCRIPT }, | 76 nsIAboutModule::ALLOW_SCRIPT }, |
66 { "telemetry", "chrome://global/content/aboutTelemetry.xhtml", | 77 { "telemetry", "chrome://global/content/aboutTelemetry.xhtml", |
67 nsIAboutModule::ALLOW_SCRIPT }, | 78 nsIAboutModule::ALLOW_SCRIPT }, |
| 79 */ |
68 { "networking", "chrome://global/content/aboutNetworking.xhtml", | 80 { "networking", "chrome://global/content/aboutNetworking.xhtml", |
69 nsIAboutModule::ALLOW_SCRIPT }, | 81 nsIAboutModule::ALLOW_SCRIPT }, |
70 { "webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.xhtml", | 82 { "webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.xhtml", |
71 nsIAboutModule::ALLOW_SCRIPT }, | 83 nsIAboutModule::ALLOW_SCRIPT }, |
72 // about:srcdoc is unresolvable by specification. It is included here | 84 // about:srcdoc is unresolvable by specification. It is included here |
73 // because the security manager would disallow srcdoc iframes otherwise. | 85 // because the security manager would disallow srcdoc iframes otherwise. |
74 { "srcdoc", "about:blank", | 86 { "srcdoc", "about:blank", |
75 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | | 87 nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | |
76 nsIAboutModule::HIDE_FROM_ABOUTABOUT } | 88 nsIAboutModule::HIDE_FROM_ABOUTABOUT } |
77 }; | 89 }; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 nsAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) | 173 nsAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) |
162 { | 174 { |
163 nsAboutRedirector* about = new nsAboutRedirector(); | 175 nsAboutRedirector* about = new nsAboutRedirector(); |
164 if (about == nullptr) | 176 if (about == nullptr) |
165 return NS_ERROR_OUT_OF_MEMORY; | 177 return NS_ERROR_OUT_OF_MEMORY; |
166 NS_ADDREF(about); | 178 NS_ADDREF(about); |
167 nsresult rv = about->QueryInterface(aIID, aResult); | 179 nsresult rv = about->QueryInterface(aIID, aResult); |
168 NS_RELEASE(about); | 180 NS_RELEASE(about); |
169 return rv; | 181 return rv; |
170 } | 182 } |
OLD | NEW |