gpt4 book ai didi

amazon-s3 - Amazon S3 中的对象 ID 有哪些限制?

转载 作者:行者123 更新时间:2023-12-02 22:22:28 24 4
gpt4 key购买 nike

我最近发现您可以通过在文件名中添加斜杠来伪造 S3 上的目录结构。这让我开始思考:对象 ID 是否有任何限制?我确信一定有一些。长度?空字符 (\0)?诸如无效 UTF-8 字符之类的神秘东西?

我确信一定有一些限制,但我似乎在文档中找不到它们。

最佳答案

根据 technical documentation :

A key is a sequence of Unicodecharacters whose UTF-8 encoding is atmost 1024 bytes long.

存储桶名称有 additional restrictions :

We recommend that all bucket names comply with DNS naming conventions.

The rules for DNS-compliant bucket names are:

  • Bucket names must be at least 3 and no more than 63 characters long.
  • Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.
  • Bucket names must not be formatted as an IP address (e.g., 192.168.5.4).

目前,美国标准区域尚未强制执行符合 DNS 的名称,但亚马逊正在朝这个方向努力。

关于amazon-s3 - Amazon S3 中的对象 ID 有哪些限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3146380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com