mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
[pretty please] allow fetching of cover art in mpris plugin from connected computer
Summary: So from android 8 onwards it appears that fetching content from "cleartext" urls is disabled by default https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted I have a mpris service running on my local computer which is connected to the android, that service is also serving cover art for currently playing song. Obviously I can not have a domain set for my computer on a local machine, so cover art urls look like `http://<ip>:<port>/<songid>.ext` . Since this restriction was introduced into android 8, kde connect is not able to fetch the art from this url. This is patch allows connections to raw IPs addresses as well. If there is any security issues regarding this change, I'm prepared to do more work, my suggestion would be to check if IP address in this case matches paired computer's IP address, although this would still be a bit annoying (especially since whatever malicious file can be served from a "cleartext" link as well). Test Plan: - start some sort of server which can serve an image on a paired computer - create mpris Player instance on a paired computer and set the `mpris:artUrl` to the served address where this image is available - open kde connect android app, select prepared player and see default cover art instead of the served image - change artUrl to some image from the web - check in kde connect again and see it correctly show a remote image Reviewers: #kde_connect, nicolasfella, albertvaka Reviewed By: #kde_connect, nicolasfella, albertvaka Subscribers: albertvaka, nicolasfella, andyholmes, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D21247
This commit is contained in:
committed by
Nicolas Fella
parent
630044e702
commit
b8d327c2d9
@@ -38,6 +38,7 @@
|
||||
android:icon="@drawable/icon"
|
||||
android:label="KDE Connect"
|
||||
android:supportsRtl="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/KdeConnectTheme">
|
||||
<service
|
||||
android:name="org.kde.kdeconnect.BackgroundService"
|
||||
|
5
res/xml/network_security_config.xml
Normal file
5
res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<!--Set application-wide security config using base-config tag.-->
|
||||
<base-config cleartextTrafficPermitted="true"/>
|
||||
</network-security-config>
|
Reference in New Issue
Block a user