Skip to content
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

If you somehow you get a non existing trackid or it is mangled somehow or a hacker is trying something uncaught errors will occur. #47

Open
akshays2112 opened this issue Oct 16, 2020 · 0 comments

Comments

@akshays2112
Copy link
Contributor

akshays2112 commented Oct 16, 2020

From the perspective of hardening the API.

If you somehow you get a non existing trackid or it is mangled somehow or a hacker is trying something uncaught errors will occur.
This might be an issue for all kinds of possible bad data being passed into the API methods.

Case example:
Test case: GetTrack_TrackIdMarket_AvailableMarketsIsNull
TrackId which passes test "11dFghVXANMlKmJXsNCbNl"
Corrupted TrackId "11dFghVXANMlKmJXsNCbd8" errors out with:

GetTrack_TrackIdMarket_AvailableMarketsIsNull
Source: TracksApiTests.cs line 52
Duration: 523 ms

Message:
Test method SpotifyApi.NetCore.Tests.TracksApiTests.GetTrack_TrackIdMarket_AvailableMarketsIsNull threw exception:
SpotifyApi.NetCore.SpotifyApiErrorException: non existing id
Stack Trace:
RestHttpClient.CheckForErrors(HttpResponseMessage response) line 119
RestHttpClient.Get(HttpClient http, Uri requestUri, AuthenticationHeaderValue authenticationHeader) line 53
SpotifyWebApi.GetModel[T](Uri uri, String accessToken) line 89
TracksApi.GetTrack[T](String trackId, String market, String accessToken) line 81
TracksApiTests.GetTrack_TrackIdMarket_AvailableMarketsIsNull() line 64

Open additional output for this result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant