Galène videoconferencing server discussion list archives
 help / color / mirror / Atom feed
From: Alexandre IOOSS <erdnaxe@crans.org>
To: Juliusz Chroboczek <jch@irif.fr>
Cc: galene@lists.galene.org
Subject: [Galene] Re: CORS help needed
Date: Mon, 4 Nov 2024 11:41:22 +0100	[thread overview]
Message-ID: <9b09e612-05ec-4737-939d-7387789f6e56@crans.org> (raw)
In-Reply-To: <87jzdjqosk.wl-jch@irif.fr>

On 11/4/24 11:24, Juliusz Chroboczek wrote:
>> In such scenario, if an attacker manage to get XSS on the custom frontend
>> (for example through a badly implemented chat box), I clearly don't want
>> them to be able to request the administrative endpoint. So having separate
>> directives is a safer choice.
> 
> Okay, you've convinced me.  What's the right syntax?  A list of strings,
> the server finds the first origin that matches and dynamically generates
> a header for that specific origin?

Why not. According to 
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#directives 
there must be some server side code to find the matching origin.


Be careful of WebSockets, if I recall correctly they don't have CORS 
headers. However, some Golang libraries implicitly add an origin check 
on WebSocket connection. See 
<https://dev.to/pssingh21/websockets-bypassing-sop-cors-5ajm>.

Best,
-- Alexandre


  reply	other threads:[~2024-11-04 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-03  8:59 [Galene] " Juliusz Chroboczek
2024-11-03 13:05 ` [Galene] " Alexandre IOOSS
2024-11-04 10:24   ` Juliusz Chroboczek
2024-11-04 10:41     ` Alexandre IOOSS [this message]
2024-11-04 11:52       ` Juliusz Chroboczek
2024-11-03 18:21 Marty Betz
2024-11-03 19:43 ` Juliusz Chroboczek

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

  List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/

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

  git send-email \
    --in-reply-to=9b09e612-05ec-4737-939d-7387789f6e56@crans.org \
    --to=erdnaxe@crans.org \
    --cc=galene@lists.galene.org \
    --cc=jch@irif.fr \
    /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