-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NewSharedKeyCredential Panics with invalid key. Should return error #84
Comments
Hi @lawrencegripper, this is already fixed in the 2018-03-28 version. I would strongly suggest to upgrade to the latest version (0.3.0) instead, where panics are mostly removed from this SDK. |
@zezha-msft Thanks for the quick reply, is there a plan to re-gen the other Service API's using the new code? I'd like to target the 2016 API version of Azure Storage ideally. |
Hi @lawrencegripper, is there a particular reason why you'd like to target the 2016 version? Currently there is no plan to keep maintaining the 2016 version, as it is a lot of effort to maintain the hand-written code simultaneously. |
The locking abstraction I'm writing is aimed at being usable across many project so I was aiming for the lowest common denominator to allow people to target Azure Stack's available API versions. That being said, as the amount of work is significant, I've put in a simple check in my code around the key value here which lets me stick to 2016 API |
Which version of the SDK was used?
Which platform are you using? (ex: Windows, Linux, Debian)
Linux (Ubuntu 18) Go 1.10.1
What problem was encountered?
The following call panics if an invalid key is presented to it. This is not a nice way to handle things. The method should return
creds, err
with the error containing some detail on why it failed, eg: "invalid key, must be valid base64 data"How can we reproduce the problem in the simplest way?
Pass a key of an account key of "somekey" to the
NewSharedKeyCredential
Have you found a mitigation/solution?
Not yet but I plan to validate the key is valid Base64 before making the call.
The text was updated successfully, but these errors were encountered: