SpotifyApi.NetCore icon indicating copy to clipboard operation
SpotifyApi.NetCore copied to clipboard

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

Open akshays2112 opened this issue 5 years ago • 0 comments

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

akshays2112 avatar Oct 16 '20 06:10 akshays2112