From 393d3f6566e20b416ec642c95e1d13a61a46b29e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Oct 2020 12:55:49 +0200 Subject: [PATCH 1/2] Add rel="noopener" to external links See https://web.dev/external-anchors-use-rel-noopener/ Using noopener, as that addresses the security issue. "noreferer" blocks the REFERER header, which may still be useful for some target URLs. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 16 ++++++------ _includes/footer.html | 4 +-- _layouts/archive-redirect.html | 2 +- compose/compose-file/index.md | 6 ++--- compose/django.md | 2 +- compose/install.md | 10 +++---- config/containers/logging/gcplogs.md | 6 ++--- config/containers/resource_constraints.md | 2 +- config/daemon/prometheus.md | 4 +-- desktop/enterprise/admin/install/mac.md | 2 +- desktop/enterprise/admin/install/windows.md | 2 +- desktop/enterprise/index.md | 4 +-- develop/dev-best-practices.md | 2 +- develop/index.md | 20 +++++++------- docker-for-mac/edge-release-notes.md | 14 +++++----- docker-for-mac/faqs.md | 10 +++---- docker-for-mac/index.md | 21 +++++++-------- docker-for-mac/install.md | 2 +- docker-for-mac/multi-arch.md | 2 +- docker-for-windows/docker-toolbox.md | 2 +- docker-for-windows/faqs.md | 14 +++++----- docker-for-windows/index.md | 12 ++++----- docker-for-windows/install.md | 2 +- docker-for-windows/troubleshoot.md | 2 +- docker-hub/billing/add-seats.md | 4 +-- docker-hub/billing/downgrade.md | 8 +++--- docker-hub/billing/faq.md | 14 +++++----- docker-hub/billing/index.md | 10 +++---- docker-hub/billing/remove-seats.md | 2 +- docker-hub/billing/upgrade.md | 10 +++---- docker-hub/convert-account.md | 2 +- docker-hub/download-rate-limit.md | 18 ++++++------- docker-hub/publish/publish.md | 12 ++++----- docker-hub/slack_integration.md | 2 +- docker-hub/vulnerability-scanning.md | 10 +++---- engine/api/index.md | 2 +- engine/context/aci-integration.md | 10 +++---- engine/context/ecs-integration.md | 22 ++++++++-------- engine/faq.md | 16 ++++++------ engine/install/centos.md | 4 +-- engine/install/debian.md | 2 +- engine/install/fedora.md | 2 +- engine/install/linux-postinstall.md | 2 +- engine/install/ubuntu.md | 2 +- engine/scan/index.md | 14 +++++----- engine/security/rootless.md | 4 +-- engine/security/userns-remap.md | 2 +- engine/swarm/networking.md | 4 +-- get-started/index.md | 4 +-- get-started/nodejs/build-images.md | 2 +- get-started/part3.md | 6 ++--- machine/concepts.md | 4 +-- machine/get-started-cloud.md | 8 +++--- machine/get-started.md | 16 ++++++------ machine/install-machine.md | 12 ++++----- notary/advanced_usage.md | 4 +-- notary/service_architecture.md | 26 +++++++++---------- opensource/index.md | 2 +- opensource/ways.md | 14 +++++----- registry/insecure.md | 4 +-- storage/bind-mounts.md | 2 +- storage/storagedriver/aufs-driver.md | 2 +- storage/storagedriver/device-mapper-driver.md | 2 +- storage/storagedriver/zfs-driver.md | 2 +- test.md | 20 +++++++------- toolbox/toolbox_install_windows.md | 4 +-- 66 files changed, 237 insertions(+), 238 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index c345dea800..b2519e161e 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -8,9 +8,9 @@ {% if controller_data.min_api_version %} -API {{ controller_data.min_api_version }}+  +API {{ controller_data.min_api_version }}+  The client and daemon API must both be at least -{{ controller_data.min_api_version }} +{{ controller_data.min_api_version }} to use this command. Use the `docker version` command on the client to check your client and daemon API versions. @@ -18,7 +18,7 @@ your client and daemon API versions. {% if controller_data.deprecated %} -> This command is [deprecated](/engine/deprecated/){: target="_blank" class="_"}. +> This command is [deprecated](/engine/deprecated/){: target="_blank" rel="noopener" class="_"}. > > It may be removed in a future Docker version. {: .warning } @@ -29,7 +29,7 @@ your client and daemon API versions. > This command is only available on Docker Enterprise Edition. > -> Learn more about [Docker Enterprise products](/ee/supported-platforms/){: target="_blank" class="_"}. +> Learn more about [Docker Enterprise products](/ee/supported-platforms/){: target="_blank" rel="noopener" class="_"}. {: .important } {% endif %} @@ -115,10 +115,10 @@ For example uses of this command, refer to the [examples section](#examples) bel {% for option in alloptions %} - {% capture deprecated-badge %}{% if option.deprecated %}deprecated{% endif %}{% endcapture %} - {% capture experimental-daemon-badge %}{% if option.experimental %}experimental (daemon){% endif %}{% endcapture %} - {% capture experimental-cli-badge %}{% if option.experimentalcli %}experimental (CLI){% endif %}{% endcapture %} - {% capture min-api %}{% if option.min_api_version %}API {{ option.min_api_version }}+{% endif %}{%endcapture%} + {% capture deprecated-badge %}{% if option.deprecated %}deprecated{% endif %}{% endcapture %} + {% capture experimental-daemon-badge %}{% if option.experimental %}experimental (daemon){% endif %}{% endcapture %} + {% capture experimental-cli-badge %}{% if option.experimentalcli %}experimental (CLI){% endif %}{% endcapture %} + {% capture min-api %}{% if option.min_api_version %}API {{ option.min_api_version }}+{% endif %}{%endcapture%} {% capture flag-orchestrator %}{% if option.swarm %}Swarm{% endif %}{% if option.kubernetes %}Kubernetes{% endif %}{% endcapture %} {% capture all-badges %}{{ deprecated-badge }}{{ experimental-daemon-badge }}{{ experimental-cli-badge }}{{ min-api }}{{ flag-orchestrator }}{% endcapture %} {% assign defaults-to-skip = "[],map[],false,0,0s,default,'',\"\"" | split: ',' %} diff --git a/_includes/footer.html b/_includes/footer.html index 6ccf02c7c7..757726b997 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -47,9 +47,9 @@
You can use the Bootstrap and CSS to add expand/collapse accordions. This implementation makes use of the `.panel-heading` classes in [`_utilities.scss`](https://github.com/docker/docker.github.io/blob/master/_scss/_utilities.scsss), -along with [FontAwesome icons](http://fontawesome.io/cheatsheet/){: target="_blank" class="_" } +along with [FontAwesome icons](http://fontawesome.io/cheatsheet/){: target="_blank" rel="noopener" class="_" } (fa-caret-down) and (fa-caret-up). @@ -433,13 +433,13 @@ the padding renders as white space around the code block grey background. If we don't like this effect, we can remove `block` for code samples. The `style="cursor: pointer"` tag enables the expand/collapse functionality to -work on mobile. (You can use the [Xcode iPhone simulator](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/GettingStartedwithiOSSimulator/GettingStartedwithiOSSimulator.html#//apple_ref/doc/uid/TP40012848-CH5-SW4){: target="_blank" class="_" } to test on mobile.) +work on mobile. (You can use the [Xcode iPhone simulator](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/GettingStartedwithiOSSimulator/GettingStartedwithiOSSimulator.html#//apple_ref/doc/uid/TP40012848-CH5-SW4){: target="_blank" rel="noopener" class="_" } to test on mobile.) There are a lot of samples out there for Bootstrap accordions. This is the model we used: [PPxOJX accordion sample with HTML and -CSS](https://codepen.io/anon/pen/PPxOJX){: target="_blank" class="_" }. (Here is +CSS](https://codepen.io/anon/pen/PPxOJX){: target="_blank" rel="noopener" class="_" }. (Here is another example, but it uses Javascript, whereas the implementation shown -[here](https://www.bootply.com/89084){: target="_blank" class="_" } is Bootstrap +[here](https://www.bootply.com/89084){: target="_blank" rel="noopener" class="_" } is Bootstrap and CSS only.) > Make sure `data-target`'s and `id`'s match, and are unique @@ -536,10 +536,10 @@ You can make a badge a link. Wrap the `` with an `` (not the other way around) so that the text on the badge is still white. ```html -Test +Test ``` -Test +Test You can also put tooltips on badges (as the example above shows). Keep reading for tooltips. diff --git a/toolbox/toolbox_install_windows.md b/toolbox/toolbox_install_windows.md index 3358f4f3a7..32e1d7a428 100644 --- a/toolbox/toolbox_install_windows.md +++ b/toolbox/toolbox_install_windows.md @@ -56,7 +56,7 @@ To verify your machine meets these requirements, do the following:
**For Windows 10** - Run [Speccy](https://www.piriform.com/speccy){: target="_blank" class="_"}, and look at the CPU information. + Run [Speccy](https://www.piriform.com/speccy){: target="_blank" rel="noopener" class="_"}, and look at the CPU information.
**For Windows 8 or 8.1** @@ -71,7 +71,7 @@ To verify your machine meets these requirements, do the following:
**For Windows 7** - Run a tool like the [Microsoft® Hardware-Assisted Virtualization Detection Tool](http://www.microsoft.com/en-us/download/details.aspx?id=592){: target="_blank" class="_"} or [Speccy](https://www.piriform.com/speccy){: target="_blank" class="_"}, and follow the on-screen instructions. + Run a tool like the [Microsoft® Hardware-Assisted Virtualization Detection Tool](http://www.microsoft.com/en-us/download/details.aspx?id=592){: target="_blank" rel="noopener" class="_"} or [Speccy](https://www.piriform.com/speccy){: target="_blank" rel="noopener" class="_"}, and follow the on-screen instructions.

3. Verify your Windows OS is 64-bit (x64) From cafd5a99433ca2bebd5c636bbe5f303001955d3b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 12 Oct 2020 13:05:17 +0200 Subject: [PATCH 2/2] Use full URLs for canonical links Canonical links are expected to be full URLs, not relative. For this to work, the Dockerfile had to be updated, because we're stripping the domain-name from links ("hello' | sed -e 's#\(]* href="\)https://docs.docker.com/#\1/#g' # hello echo 'hello' | sed -e 's#\(]* href="\)https://docs.docker.com/#\1/#g' # hello But, for example, this one is left alone echo '' | sed -e 's#\(]* href="?\)https://docs.docker.com/#\1/#g' # Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 2 +- _includes/head.html | 2 +- _layouts/engine-api.html | 2 +- _layouts/redirect.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0555ed72d..b6f9ff4302 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ COPY --from=upstream-resources /usr/src/app/md_source/. ./ # API docs, based on the latest_engine_api_version parameter in _config.yml RUN ./_scripts/update-api-toc.sh RUN jekyll build -d ${TARGET} \ - && find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#href="https://docs.docker.com/#href="/#g' "$i"; done \ + && find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#\(]* href="\)https://docs.docker.com/#\1/#g' "$i"; done \ && sed -i 's#/#https://docs.docker.com/#' "${TARGET}/sitemap.xml" diff --git a/_includes/head.html b/_includes/head.html index d19737f0f0..c90a7d4ad4 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -33,7 +33,7 @@ {{ page.title | default: page_title }} | Docker Documentation - + diff --git a/_layouts/engine-api.html b/_layouts/engine-api.html index eb2ddd16d2..bdf40a7dea 100644 --- a/_layouts/engine-api.html +++ b/_layouts/engine-api.html @@ -13,7 +13,7 @@ - + diff --git a/_layouts/redirect.html b/_layouts/redirect.html index 54ed7502e7..e5c382d1e7 100644 --- a/_layouts/redirect.html +++ b/_layouts/redirect.html @@ -2,7 +2,7 @@ Redirecting… - +

Redirecting…