0002-00000075

Updated at:

Issue description

The Signature field in the signed URL is left empty.

Causes

A signed URL is used to send a request, but the Signature field in the URL parameter is left empty.

Examples

You initiated a request to include the signature in the URL parameter, but the Signature field is left empty.

GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature= HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

The following code provides an example on how to calculate the Signature field:

Signature = urlencode(base64(hmac-sha1(AccessKeySecret,
          VERB + "\n" 
          + CONTENT-MD5 + "\n" 
          + CONTENT-TYPE + "\n" 
          + EXPIRES + "\n" 
          + CanonicalizedOSSHeaders
          + CanonicalizedResource)))

Solutions

Make sure that the URL of a request includes the Signature field and that the Signature field is correctly specified.

GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

The following code provides an example on how to calculate the Signature field:

Signature = urlencode(base64(hmac-sha1(AccessKeySecret,
          VERB + "\n" 
          + CONTENT-MD5 + "\n" 
          + CONTENT-TYPE + "\n" 
          + EXPIRES + "\n" 
          + CanonicalizedOSSHeaders
          + CanonicalizedResource)))

For more information, see Add signatures to URLs.

Note

You can use an SDK to send requests. SDKs automatically sign your requests. For more information, see Use Alibaba Cloud SDKs to initiate requests.