Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint mdn links #33376

Merged
merged 6 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
lint mdn link, lint http => https
  • Loading branch information
PassionPenguin committed May 2, 2024
commit d9e9352e95dccc9d63d5754a79db65e4ea8bd433
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ XSS is a term used to describe a class of attacks that allow an attacker to inje
The XSS vulnerabilities are divided into _reflected_ and _persistent_, based on how the site returns the injected scripts to a browser.

- A _reflected_ XSS vulnerability occurs when user content that is passed to the server is returned _immediately_ and _unmodified_ for display in the browser. Any scripts in the original user content will be run when the new page is loaded.
For example, consider a site search function where the search terms are encoded as URL parameters, and these terms are displayed along with the results. An attacker can construct a search link that contains a malicious script as a parameter (e.g., `http://developer.mozilla.org?q=beer<script%20src="http://example.com/tricky.js"></script>`) and email it to another user. If the target user clicks this "interesting link", the script will be executed when the search results are displayed. As discussed earlier, this gives the attacker all the information they need to enter the site as the target user, potentially making purchases as the user or sharing their contact information.
For example, consider a site search function where the search terms are encoded as URL parameters, and these terms are displayed along with the results. An attacker can construct a search link that contains a malicious script as a parameter (e.g., `https://developer.mozilla.org?q=beer<script%20src="http://example.com/tricky.js"></script>`) and email it to another user. If the target user clicks this "interesting link", the script will be executed when the search results are displayed. As discussed earlier, this gives the attacker all the information they need to enter the site as the target user, potentially making purchases as the user or sharing their contact information.
- A _persistent_ XSS vulnerability occurs when the malicious script is _stored_ on the website and then later redisplayed unmodified for other users to execute unwittingly.
For example, a discussion board that accepts comments that contain unmodified HTML could store a malicious script from an attacker. When the comments are displayed, the script is executed and can send to the attacker the information required to access the user's account. This sort of attack is extremely popular and powerful, because the attacker might not even have any direct engagement with the victims.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mdn/community/issues/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Ensure sections follow the order defined in the CSS property template

### Description

The CSS property page template is defined [here](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/CSS_property_page_template).
The CSS property page template is defined [here](/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/CSS_property_page_template).
The task list in this issue will be used to compare the documented CSS properties with the template and track changes to the property pages for compliance.

### List of pages checked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ Be sure to test your extension carefully on Firefox 2 before you release it to t

## Step 4: Release

Update your extension's entry on [http://addons.mozilla.org](https://addons.mozilla.org). This will ensure that users can find it.
Update your extension's entry on [https://addons.mozilla.org](https://addons.mozilla.org). This will ensure that users can find it.

In addition, if your extension provides an [`updateURL`](/en-US/Install_Manifests#updateurl) in the install manifest, be sure to update the update manifest so that the new version of your extension can be found automatically by Firefox. By doing this, the first time the user runs your extension after upgrading to Firefox 2, Firefox can offer to automatically install it for them.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Firefox 3.5 closes a security hole that made it possible to use remote chrome. T

Previously, it was possible to get a load context from a request by querying various docShell APIs. In particular, it was a common practice to use `notificationCallbacks.getInterface(nsIDOMWindow)` to get the window object associated with the load. While the older approach may work in some circumstances, it is not recommended to use it anymore ([details](https://bugzil.la/457153#c16)).

This correct and reliable way to do this is to use an `nsILoadContext` (see the [interface definition](http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsILoadContext.idl) on mxr).
This correct and reliable way to do this is to use an `nsILoadContext` (see the [interface definition](https://mxr.mozilla.org/mozilla-central/source/docshell/base/nsILoadContext.idl) on mxr).

From JavaScript, you do it like this:

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/document/createelementns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ elements from two different namespaces within a single document:

```xml
<?xml version="1.0"?>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<page xmlns="https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
xmlns:html="http://www.w3.org/1999/xhtml"
title="||Working with elements||"
onload="init()">
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/document_object_model/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ The following example shows the use of the `height` and `width` properties along
<body onload="init();">
<p>
Image 1: no height, width, or style
<img id="image1" src="http://www.mozilla.org/images/mozilla-banner.gif" />
<img id="image1" src="https://www.mozilla.org/images/mozilla-banner.gif" />
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
</p>

<p>
Image 2: height="50", width="500", but no style
<img
id="image2"
src="http://www.mozilla.org/images/mozilla-banner.gif"
src="https://www.mozilla.org/images/mozilla-banner.gif"
height="50"
width="500" />
</p>
Expand All @@ -68,7 +68,7 @@ The following example shows the use of the `height` and `width` properties along
Image 3: no height, width, but style="height: 50px; width: 500px;"
<img
id="image3"
src="http://www.mozilla.org/images/mozilla-banner.gif"
src="https://www.mozilla.org/images/mozilla-banner.gif"
style="height: 50px; width: 500px;" />
</p>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/hasattributens/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A boolean.
// Check that the attribute exists before you set a value
const d = document.getElementById("div1");
if (
d.hasAttributeNS("http://www.mozilla.org/ns/specialspace/", "special-align")
d.hasAttributeNS("https://www.mozilla.org/ns/specialspace/", "special-align")
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
) {
d.setAttribute("align", "center");
}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/namespaceuri/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this snippet, an element is being examined for its {{domxref("Element.localNa
if (
element.localName === "browser" &&
element.namespaceURI ===
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
"https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
) {
// this is a XUL browser
}
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/element/removeattributens/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ None ({{jsxref("undefined")}}).

```js
// Given:
// <div id="div1" xmlns:special="http://www.mozilla.org/ns/specialspace"
// <div id="div1" xmlns:special="https://www.mozilla.org/ns/specialspace"
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
// special:specialAlign="utterleft" width="200px" />
d = document.getElementById("div1");
d.removeAttributeNS("http://www.mozilla.org/ns/specialspace", "specialAlign");
d.removeAttributeNS("https://www.mozilla.org/ns/specialspace", "specialAlign");
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
// Now: <div id="div1" width="200px" />
```

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/element/setattributenodens/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ The replaced attribute node, if any, returned by this function.
## Examples

```js
// <div id="one" xmlns:myNS="http://www.mozilla.org/ns/specialspace"
// <div id="one" xmlns:myNS="https://www.mozilla.org/ns/specialspace"
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
// myNS:special-align="utterleft">one</div>
// <div id="two">two</div>

const myns = "http://www.mozilla.org/ns/specialspace";
const myns = "https://www.mozilla.org/ns/specialspace";
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
const d1 = document.getElementById("one");
const d2 = document.getElementById("two");
const a = d1.getAttributeNodeNS(myns, "special-align");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/setattributens/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("undefined")}}).
```js
let d = document.getElementById("d1");
d.setAttributeNS(
"http://www.mozilla.org/ns/specialspace",
"https://www.mozilla.org/ns/specialspace",
PassionPenguin marked this conversation as resolved.
Show resolved Hide resolved
"spec:align",
"center",
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function FileUpload(img, file) {
);
xhr.open(
"POST",
"http://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php",
"https://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php",
);
xhr.overrideMimeType("text/plain; charset=x-user-defined-binary");
reader.onload = (evt) => {
Expand Down