mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #387] username and password are eval'd by shell #251
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#251
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?
Originally created by @skyegecko on GitHub (Oct 19, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/387
Hi,
This was a bit of a hunt to get pinned down, so let me explain:
librespot was failing to start, with journalctl giving the error:
Inspecting the named script showed no obvious problems, but upon running the file manually I received the same message.
By commenting out all the lines, then adding them back in one by one, the problem appears to be on the second real line of code:
I looked for
oe_setup_addonand found that it was a function, defined in/etc/profile.d/00-addons.conf:By adding
set -xto thelibrespot.startscript, I managed to read that the following was being executed in this function (XML_SETTINGS_VERis 2 so this is the firstevalin the function):The
ls_pvariable has been redacted as it contains my spotify password. As you can see however, things have gotten weird: an angle bracket has become>and a"quote mark has gone in unescaped. This caused the following character in the password, a parenthesis, to be eval'd, which caused the error.Since I don't require the login support any more (I had it enabled some time ago) I can erase the password from my settings. However, it seems sensible to have both username and password sanitized before being stored in
settings.xmlsince they are being eval'd (as root!) on the command line.Thanks!
@skyegecko commented on GitHub (Oct 19, 2019):
This bug has also been posted on the Libreelec bug reports forum as it could be considered a general issue with Libreelec. Thread is here but may not be available until it has been authorized by a moderator.
@kingosticks commented on GitHub (Oct 19, 2019):
Sorry, I don't understand, how is this an issue with librespot?
@skyegecko commented on GitHub (Oct 19, 2019):
It was my understanding that this is the repo for the librespot plugin for libreelec, is this not correct?
@kingosticks commented on GitHub (Oct 20, 2019):
This is the repo for librespot, nothing to do with libreelec I'm afraid. The startup script and this settings.xml file are nothing to do with us here.
@shanemeagher commented on GitHub (Oct 20, 2019):
This is the thread for the Librespot Addon for LibreELEC (https://forum.libreelec.tv/thread/8438-librespot-addon/) although I see awiouy who maintains the addon approved your new thread so I'm sure he'll look into it when he has a chance.
@kingosticks commented on GitHub (Oct 20, 2019):
Yes, the question seems to be:
But actualy thats not really to do with librespot either. Handling multiple sound sources is a management job for the system, not the source. This would be fixed in alsa or pulseaudio (whatever is applicable for libreelec).
Edit : that thread is 31 pages! I take it back, I've no idea what the question is.
protobuf-codegen-pureto removeprotocdependency #856