Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.8k stars 320 forks source link

Azurite doesn't check if continuationToken is valid when use List Queues operation on queue service #661

Open zzhxiaofeng opened 3 years ago

zzhxiaofeng commented 3 years ago

Error Description: In Azure, it will return error "OutOfRangeInput" when use List Queues operation with invalid continuationToken on queue service. But in Azurite, it will list queues successfully in this case. Azure error is shown as following: Screenshot 2020-12-15 144001

To Reproduce The demo code is shown as following:

import { StorageSharedKeyCredential, QueueServiceClient } from "@azure/storage-queue"
import * as assert from "assert"

async function main(){
  const queueServiceClient = new QueueServiceClient("<queue-endpoint>",new StorageSharedKeyCredential("<account-name>","<account-key>"))
  const result = (await queueServiceClient.listQueues().byPage({ continuationToken: "garbage" }).next()).value;
}

main().catch((err)=>{
  assert.ok((err as any).response.parsedBody.Code === "OutOfRangeInput");
});

Expected Behavior When use List Queues operation with invalid continuationToken on queue service, Azurite return error "OutOfRangeInput".

@jongio for notification.

XiaoningLiu commented 3 years ago

Thanks for reporting this. Azurite doesn't check continuation token. Should improve this.

v-xuto commented 3 years ago

azsdk-azurite

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.