This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new aee325e2ac Add explicit browsers list and correct rel for blank target 
links (#32633)
aee325e2ac is described below

commit aee325e2ac78eeb77250050929660965935e4366
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Sun Jul 16 16:55:50 2023 +0200

    Add explicit browsers list and correct rel for blank target links (#32633)
---
 airflow/www/package.json                     | 12 ++++++++++++
 airflow/www/static/js/ti_log.js              |  3 ++-
 airflow/www/templates/airflow/dags.html      |  8 ++++----
 airflow/www/templates/airflow/main.html      |  2 +-
 airflow/www/templates/airflow/plugin.html    |  2 +-
 airflow/www/templates/airflow/providers.html |  2 +-
 airflow/www/yarn.lock                        |  6 +++---
 7 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/airflow/www/package.json b/airflow/www/package.json
index 6ee89d5c83..cad6a6320a 100644
--- a/airflow/www/package.json
+++ b/airflow/www/package.json
@@ -29,6 +29,18 @@
     "database",
     "flask"
   ],
+  "browserslist": {
+    "production": [
+      ">0.2%",
+      "not dead",
+      "not op_mini all"
+    ],
+    "development": [
+      "last 1 chrome version",
+      "last 1 firefox version",
+      "last 1 safari version"
+    ]
+  },
   "devDependencies": {
     "@babel/core": "^7.18.5",
     "@babel/eslint-parser": "^7.18.2",
diff --git a/airflow/www/static/js/ti_log.js b/airflow/www/static/js/ti_log.js
index 23fd0af769..02f2aa1427 100644
--- a/airflow/www/static/js/ti_log.js
+++ b/airflow/www/static/js/ti_log.js
@@ -133,7 +133,8 @@ function autoTailingLog(tryNumber, metadata = null, 
autoTailing = false) {
         const linkifiedMessage = escapedMessage
           .replace(
             urlRegex,
-            (url) => `<a href="${url}" target="_blank">${url}</a>`
+            (url) =>
+              `<a href="${url}" target="_blank" rel="noopener 
noreferrer">${url}</a>`
           )
           .replaceAll(
             dateRegex,
diff --git a/airflow/www/templates/airflow/dags.html 
b/airflow/www/templates/airflow/dags.html
index f575ece3b1..93d1d8189e 100644
--- a/airflow/www/templates/airflow/dags.html
+++ b/airflow/www/templates/airflow/dags.html
@@ -110,18 +110,18 @@
     {% call show_message(category='warning', dismissible=false) %}
       Do not use <b>SQLite</b> as metadata DB in production &#8211; it should 
only be used for dev/testing.
       We recommend using Postgres or MySQL.
-      <a href={{ get_docs_url("howto/set-up-database.html") }} 
target="_blank"><b>Click here</b></a> for more information.
+      <a href={{ get_docs_url("howto/set-up-database.html") }} target="_blank" 
rel="noopener noreferrer"><b>Click here</b></a> for more information.
     {% endcall %}
   {% endif %}
   {% if production_executor_warning | default(false) %}
     {% call show_message(category='warning', dismissible=false) %}
       Do not use the <b>{{ production_executor_warning }}</b> in production.
-      <a href={{ get_docs_url("executor/index.html") }}  
target="_blank"><b>Click here</b></a> for more information.
+      <a href={{ get_docs_url("executor/index.html") }}  target="_blank" 
rel="noopener noreferrer"><b>Click here</b></a> for more information.
     {% endcall %}
   {% endif %}
   {% if otel_on | default(false) %}
     {% call show_message(category='warning', dismissible=false) %}
-      OpenTelemetry support is experimental. <a 
href="https://github.com/apache/airflow/blob/main/BREEZE.rst#running-breeze-with-an-opentelemetry-metrics-stack";
 target="_blank">
+      OpenTelemetry support is experimental. <a 
href="https://github.com/apache/airflow/blob/main/BREEZE.rst#running-breeze-with-an-opentelemetry-metrics-stack";
 target="_blank" rel="noopener noreferrer">
         <b>Click here</b></a> for more information.
     {% endcall %}
   {% endif %}
@@ -273,7 +273,7 @@
               {% for owner in dag.owners.split(",") %}
                 <a class="label label-default"
                  {% if owner_links and owner.strip() in 
owner_links.get(dag.dag_id, {}) %}
-                   href="{{ owner_links[dag.dag_id].get(owner.strip()) }}" 
target="_blank"
+                   href="{{ owner_links[dag.dag_id].get(owner.strip()) }}" 
target="_blank" rel="noopener noreferrer"
                  {% else %}
                    href="?search={{ owner | trim }}"
                  {% endif %}
diff --git a/airflow/www/templates/airflow/main.html 
b/airflow/www/templates/airflow/main.html
index c977276940..6a6b4156d2 100644
--- a/airflow/www/templates/airflow/main.html
+++ b/airflow/www/templates/airflow/main.html
@@ -96,7 +96,7 @@
     <footer class="footer">
       <div class="container">
         <div>
-          {{ version_label }}: {% if airflow_version %}<a 
href="https://pypi.python.org/pypi/apache-airflow/{{ airflow_version }}" 
target="_blank">v{{ airflow_version }}</a>{% else %} N/A{% endif %}
+          {{ version_label }}: {% if airflow_version %}<a 
href="https://pypi.python.org/pypi/apache-airflow/{{ airflow_version }}" 
target="_blank" rel="noopener noreferrer">v{{ airflow_version }}</a>{% else %} 
N/A{% endif %}
           {% if git_version %}<br>Git Version: <strong>{{ git_version 
}}</strong>{% endif %}
         </div>
         <div></div>
diff --git a/airflow/www/templates/airflow/plugin.html 
b/airflow/www/templates/airflow/plugin.html
index 0e91a8e63b..5bf0d02f35 100644
--- a/airflow/www/templates/airflow/plugin.html
+++ b/airflow/www/templates/airflow/plugin.html
@@ -27,7 +27,7 @@ under the License.
   <h2>{{ title }}</h2>
   {% if plugins|length == 0 %}
     <p>No plugins loaded. Learn more in the
-      <a href="{{ doc_url }}" target="_blank">plugins documentation</a>.
+      <a href="{{ doc_url }}" target="_blank" rel="noopener 
noreferrer">plugins documentation</a>.
     </p>
   {% endif %}
   {% for plugin in plugins %}
diff --git a/airflow/www/templates/airflow/providers.html 
b/airflow/www/templates/airflow/providers.html
index ec86ae536c..a1fcb30ba7 100644
--- a/airflow/www/templates/airflow/providers.html
+++ b/airflow/www/templates/airflow/providers.html
@@ -27,7 +27,7 @@ under the License.
   <h2>{{ title }}</h2>
   {% if providers|length == 0 %}
     <p>No providers loaded. Learn more in the
-      <a href="{{ doc_url }}" target="_blank">provider packages 
documentation</a>.
+      <a href="{{ doc_url }}" target="_blank" rel="noopener 
noreferrer">provider packages documentation</a>.
     </p>
   {% endif %}
 
diff --git a/airflow/www/yarn.lock b/airflow/www/yarn.lock
index f65a34ff0b..601cd22d34 100644
--- a/airflow/www/yarn.lock
+++ b/airflow/www/yarn.lock
@@ -4427,9 +4427,9 @@ caniuse-api@^3.0.0:
     lodash.uniq "^4.5.0"
 
 caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001349:
-  version "1.0.30001439"
-  resolved 
"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz";
-  integrity 
sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==
+  version "1.0.30001516"
+  resolved 
"https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz#621b1be7d85a8843ee7d210fd9d87b52e3daab3a";
+  integrity 
sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==
 
 ccount@^2.0.0:
   version "2.0.1"

Reply via email to