pagure/0001-Make-sure-authorized_keys-file-has-mode-600.patch
Neal Gompa 9c6e7fdf78 - Backport fixes for STARTTLS support
+ Patch: 0002-starttls-support-via-SMTP_STARTTLS-provide-additiona.patch
  + Patch: 0001-Do-not-assume-there-is-a-SMTP_STARTTLS-configuration.patch
- Backport fix for docs repo access grant
  + Patch: 0001-Fix-repotype-spelling.patch
- Backport fix for visual bug on API docs formatting
  + Patch: 0001-api-fix-apidoc-format-on-api_view_issues_history_det.patch
- Backport fix to changing pull mirror settings
  + Patch: 0001-Allow-editing-the-URL-a-project-is-mirrored-from.patch
- Backport fix to add descriptions to API scopes
  + Patch: 0001-Show-the-ACL-name-in-addition-to-the-description-whe.patch
- Backport fix to make heatmap UI functional again
  + Patch: 0001-Bring-back-JS-library-used-for-the-heatmap.patch
- Backport fix for handling headers
  + Patch: 0001-Ensure-the-title-name-of-the-headers-are-strings.patch
- Backport fix for burndown graph title
  + Patch: 0001-Fix-the-title-of-the-graph-showing-the-evolution-of-.patch
- Backport fix for permissions on authorized_keys file
  + Patch: 0001-Make-sure-authorized_keys-file-has-mode-600.patch
- Add patch to use whitenoise for rendering static assets
  + Patch: 0101-Use-WhiteNoise-to-serve-static-assets-for-the-Pagure.patch
- Refresh default configuration patch
  + Patch: pagure-5.0-default-example-cfg.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=39
2020-06-21 13:57:24 +00:00

31 lines
987 B
Diff

From 2691e9d47d45be9a72798bd84166d09b5c3c8d82 Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Sun, 7 Jun 2020 17:16:15 -0400
Subject: [PATCH] Make sure authorized_keys file has mode 600.
Only the pagure user needs to be able to read and write the file.
---
pagure/lib/tasks.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py
index eaef5cdb..73323ef7 100644
--- a/pagure/lib/tasks.py
+++ b/pagure/lib/tasks.py
@@ -1270,6 +1270,7 @@ def add_key_to_authorized_keys(self, session, ssh_folder, username, sshkey):
sshkey.strip(),
)
)
+ os.chmod(fullpath, 0o600)
@conn.task(queue=pagure_config.get("AUTHORIZED_KEYS_QUEUE", None), bind=True)
@@ -1294,3 +1295,4 @@ def remove_key_from_authorized_keys(self, session, ssh_folder, sshkey):
with open(fullpath, "w") as stream:
stream.write("\n".join(output))
+ os.chmod(fullpath, 0o600)
--
2.26.2