Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Percent-encode URL paths in HLS playlists
Date: Fri, 23 May 2025 21:05:58 +0000
Message-ID: <DM8P223MB0365500A74296A4131AFC20DBA98A@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <5018f03c-8673-17c3-23d2-50e53dd5effc@passwd.hu>



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Marton
> Balint
> Sent: Freitag, 23. Mai 2025 22:31
> To: Timothy Allen via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Percent-encode URL paths in HLS playlists
> 
> 
> 
> On Fri, 23 May 2025, Timothy Allen via ffmpeg-devel wrote:
> 
> > This commit closes trac ticket 10679.
> 
> And what if the M3U8 is referencing absolute URLs with scheme? Or is using
> a data URI? Or if it is a local DOS path? What if the URL is already
> percent encoded?
> 
> This issue is not trivial to fix, so I really meant it when I wrote that
> its worth checking what heuristics other software is using for this issue.
> 
> Thanks,
> Marton

I agree with Marton, it cannot be done that way.

What I had actually in mind was a more targeted approach:

1. If the playlist has absolute URLs 
   => leave them alone - we can assume they must be valid

2. If the playlist has relative URLs

   => don't touch the base URL. It is already working+
      (otherwise we couldn't have loaded the playlist)

   => only percent-encode the url fragment from the playlist


For Marton's additional point about the relative URL being URL-encoded 
already, you could check for a list of chars that are disallowed in URLs
(excepting percent sign). Then URL-encode only when such char is present,
as that means it's not URL-encoded yet.

The edge case of a percent-sign needing to be escaped is probably 
negligible.

Best,
sw







_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2025-05-23 21:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 14:53 Timothy Allen via ffmpeg-devel
2025-05-23 20:31 ` Marton Balint
2025-05-23 21:05   ` softworkz . [this message]
2025-05-23 21:36 ` softworkz .
2025-05-24 16:32 ` Rémi Denis-Courmont

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=DM8P223MB0365500A74296A4131AFC20DBA98A@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM \
    --to=softworkz-at-hotmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git