From 63dbea009218a53fdf6d76fb41c8a6dd76998264 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Tue, 30 May 2023 11:47:56 +0200 Subject: [PATCH] Merge pull request #13211 from overleaf/jpa-hotfix-4-0-1 [server-pro] prepare hotfix 4.0.1 GitOrigin-RevId: 42b543d5468614a820ca7f9f29c5c6b83d1f7e69 --- server-ce/hotfix/4.0.1/Dockerfile | 9 +++++++++ server-ce/hotfix/4.0.1/outline_doc_icon.patch | 9 +++++++++ server-ce/hotfix/4.0.1/pr_13229_ce_only.patch | 14 ++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 server-ce/hotfix/4.0.1/Dockerfile create mode 100644 server-ce/hotfix/4.0.1/outline_doc_icon.patch create mode 100644 server-ce/hotfix/4.0.1/pr_13229_ce_only.patch diff --git a/server-ce/hotfix/4.0.1/Dockerfile b/server-ce/hotfix/4.0.1/Dockerfile new file mode 100644 index 0000000000..95d053617c --- /dev/null +++ b/server-ce/hotfix/4.0.1/Dockerfile @@ -0,0 +1,9 @@ +FROM sharelatex/sharelatex:4.0.0 + +# Patch: Block access to metrics endpoint +COPY pr_13229_ce_only.patch . +RUN patch -p0 --directory=/ < pr_13229_ce_only.patch + +# Patch: Remove documentation link from editor outline +COPY outline_doc_icon.patch . +RUN patch -p0 < outline_doc_icon.patch diff --git a/server-ce/hotfix/4.0.1/outline_doc_icon.patch b/server-ce/hotfix/4.0.1/outline_doc_icon.patch new file mode 100644 index 0000000000..847cfde633 --- /dev/null +++ b/server-ce/hotfix/4.0.1/outline_doc_icon.patch @@ -0,0 +1,9 @@ +--- services/web/app/views/project/editor/file-tree-react.pug ++++ services/web/app/views/project/editor/file-tree-react.pug +@@ -38,5 +38,3 @@ aside.editor-sidebar.full-size + highlighted-line="highlightedLine" + show="show" + ) +- +- documentation-button +\ No newline at end of file diff --git a/server-ce/hotfix/4.0.1/pr_13229_ce_only.patch b/server-ce/hotfix/4.0.1/pr_13229_ce_only.patch new file mode 100644 index 0000000000..9bb134fbe3 --- /dev/null +++ b/server-ce/hotfix/4.0.1/pr_13229_ce_only.patch @@ -0,0 +1,14 @@ +--- etc/nginx/sites-enabled/sharelatex.conf ++++ etc/nginx/sites-enabled/sharelatex.conf +@@ -4,6 +4,11 @@ server { + + root /overleaf/services/web/public/; + ++ # block external access to prometheus /metrics ++ location /metrics { ++ internal; ++ } ++ + location / { + proxy_pass http://127.0.0.1:3000; + proxy_http_version 1.1;