mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 16:25:52 +03:00
[PR #1239] [MERGED] Fix SpotifyId base 62 and 16 str decoding #1296
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/librespot-org/librespot/pull/1239
Author: @lelloman
Created: 1/3/2024
Status: ✅ Merged
Merged: 5/26/2024
Merged by: @roderickvd
Base:
dev← Head:fix-base62-16-id-decoding-overflow📝 Commits (1)
ce5e2f2Fix SpotifyId base 62 and 16 str decoding📊 Changes
1 file changed (+37 additions, -4 deletions)
View changed files
📝
core/src/spotify_id.rs(+37 -4)📄 Description
A SpotifyId is expected to be a 128 bits integer and can be parsed from a base 62 or 16 string. However the parsing functions only checked the validity of the characters of the string, but not its length. This could result in integer overflows or the parsing of incorrect strings as Spotify ids.
This commit add some checks to the length of the input string passed to the parse functions, and also checks for integer overflows in case of base62 encoded strings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.