public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] superseded: [PATCH pmg-api] fix #5438: api: mimetypes: allow all authenticated users
Date: Tue, 23 Sep 2025 11:26:49 +0200	[thread overview]
Message-ID: <20250923112649.14b8a0ae@rosa.proxmox.com> (raw)
In-Reply-To: <20250923082431.3629-1-s.ivanov@proxmox.com>

fixed a glitch in the commit message in:
https://lore.proxmox.com/pmg-devel/20250923092611.5058-1-s.ivanov@proxmox.com/T/#u

On Tue, 23 Sep 2025 10:24:31 +0200
Stoiko Ivanov <s.ivanov@proxmox.com> wrote:

> The list of mime-types recognized by the system is not really
> sensitive information. The call itself reads a directory from disk,
> which technically has a potential for causing load (but that should be
> cached after the first read).
> 
> Allowing it for all authenticated backend users should be ok.
> 
> The issue itself is fixed by allowing all 'admin' users to
> access it, as they are the ones who can edit what-objects (where this
> is queried).
> 
> To err on the cautious side the patch still only allows admin users.
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> 
>  src/PMG/API2/MimeTypes.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/PMG/API2/MimeTypes.pm b/src/PMG/API2/MimeTypes.pm
> index f18879fc..688c68eb 100644
> --- a/src/PMG/API2/MimeTypes.pm
> +++ b/src/PMG/API2/MimeTypes.pm
> @@ -73,6 +73,7 @@ __PACKAGE__->register_method({
>      path => '',
>      method => 'GET',
>      description => "Get Mime Types List",
> +    permissions => { check => ['admin'] },
>      parameters => {
>          additionalProperties => 0,
>      },



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


      reply	other threads:[~2025-09-23  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23  8:24 [pmg-devel] " Stoiko Ivanov
2025-09-23  9:26 ` Stoiko Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250923112649.14b8a0ae@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal