什么是可通过S3 REST API来访问有效的S3键的名字呢? [英] What are valid S3 key names that can be accessed via the S3 rest API?

查看:178
本文介绍了什么是可通过S3 REST API来访问有效的S3键的名字呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从AWS的文档,我的理解是:

From the AWS docs, I understand that:

  • 在S3键名称可以是任何UNI code名称:LT; 1024字符
  • 当使用GET OBJ,我需要URL连接code键的名称来访问它。

然而,这些规定显得过于宽松。

However, these rules seem too permissive.

举例来说,如果我做了一个名为键../../d',当我试图用GET对象API访问时就会出现一个400错误。有趣的是,我没有问题,访问'../ D'。

For instance, if I make a key called '../../d', a 400 ERROR occurs when I attempt to access it with the GET OBJECT API. Interestingly, I have no problem accessing '../d'.

有没有文件规定是什么,是不合法的吗?

Is there a document specifying what is and is not legal?

推荐答案

由亚马逊提供的唯一限制是(因为他们的技术常见问题解答):

The only restrictions provided by Amazon is (as found on their Technical FAQ):

被允许在桶或对象的名称是什么字?
  一个关键是一个序列的统一code字符的UTF-8编码最多为1024字节。

What characters are allowed in a bucket or object name?
A key is a sequence of Unicode characters whose UTF-8 encoding is at most 1024 bytes long.

附加限制适用于提桶(如在规则发现桶命名他们的的章节。 HTML>桶约束和限制 FAQ):

Additional restrictions apply for Buckets (as found on the Rules for Bucket Naming section of their Bucket Restrictions and Limitations FAQ):

在除美国标准区域的bucket名称必须符合所有地区   以下规则。这些结果在DNS兼容的桶的名字。

In all regions except for the US Standard region a bucket name must comply with the following rules. These result in a DNS compliant bucket name.

      
  • 在桶名称必须至少为3,不超过63个字符
  •   
  • 在桶名称必须是一系列用句点分隔的一个或多个标签,每个标签(。):   
        
    • 必须以小写字母或数字
    •   
    • 必须以小写字母或数字结尾
    •   
    • 可以包含小写字母,数字及破折号
    •   
    • Bucket names must be at least 3 and no more than 63 characters long
    • Bucket name must be a series of one or more labels separated by a period (.), where each label:
      • Must start with a lowercase letter or a number
      • Must end with a lowercase letter or a number
      • Can contain lowercase letters, numbers and dashes

      减许可限制适用于美国标准的区域。请参见常见问题解答更多 信息和一些例子。希望它可以帮助!

      Less permissive restrictions apply to the US standard region. Please see the FAQs for additional information and some examples. Hope it helps!

      这篇关于什么是可通过S3 REST API来访问有效的S3键的名字呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆