Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: WooDzu <woodzu123@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH] libavformat: increase MAX_URL_SIZE
Date: Sat, 28 Oct 2023 15:04:38 +0200
Message-ID: <03aae8d1-edc7-4bb8-b2c8-23ac49c665c0@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

With the rise of object storage, like S3, it is not uncommon to generate
long pre-signed URLs. When a pre-signed URL is generated using a
short-lived credentials it may include a query parameter called
X-Amz-Security-Token that is 4kB on its own.
The current MAX_URL_SIZE will trim the URL with no any errors or
warnings and the request will fail with a http 400 error.

Signed-off-by: Piotr Gasiorowski <piotr@lwks.com>
---
  libavformat/internal.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/internal.h b/libavformat/internal.h
index 7702986c9c..d6465bad7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
   #include "avformat.h"
  -#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192
   /** size of probe buffer, for guessing file type from file contents */
  #define PROBE_BUF_MIN 2048
-- 
2.39.2 (Apple Git-143)

[-- Attachment #2: 0001-libavformat-increase-MAX_URL_SIZE.patch --]
[-- Type: text/x-patch, Size: 1091 bytes --]

From bfc0dc3e68f1d1cec33084bbea0dd87e19d325d5 Mon Sep 17 00:00:00 2001
From: Piotr Gasiorowski <piotr@lwks.com>
Date: Sat, 28 Oct 2023 14:00:38 +0200
Subject: [PATCH] libavformat: increase MAX_URL_SIZE

With the rise of object storage, like S3, it is not uncommon to generate
long pre-signed URLs. When a pre-signed URL is generated using a
short-lived credentials it may include a query parameter called
X-Amz-Security-Token that is 4kB on its own.
The current MAX_URL_SIZE will trim the URL with no any errors or
warnings and the request will fail with a http 400 error.

Signed-off-by: Piotr Gasiorowski <piotr@lwks.com>
---
 libavformat/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/internal.h b/libavformat/internal.h
index 7702986c9c..d6465bad7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
 
 #include "avformat.h"
 
-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192
 
 /** size of probe buffer, for guessing file type from file contents */
 #define PROBE_BUF_MIN 2048
-- 
2.39.2 (Apple Git-143)


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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:[~2023-10-28 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 13:04 WooDzu [this message]
2023-11-08 15:32 ` Anton Khirnov

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=03aae8d1-edc7-4bb8-b2c8-23ac49c665c0@gmail.com \
    --to=woodzu123@gmail.com \
    --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