<table><tr><td style="">cotko created this revision.<br />cotko added a reviewer: KDE Connect.<br />Herald added a project: KDE Connect.<br />Herald added a subscriber: kdeconnect.<br />cotko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21247">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>So from android 8 onwards it appears that fetching content from "cleartext" urls is disabled by default</p>
<p><a href="https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted" class="remarkup-link" target="_blank" rel="noreferrer">https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted</a></p>
<p>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 <br />
<tt style="background: #ebebeb; font-size: 13px;">http://<ip>:<port>/<songid>.ext</tt> . Since this restriction was introduced into android 8, kde connect is not able to fetch the art from this url.</p>
<p>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).</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">start some sort of server which can serve an image on a paired computer</li>
<li class="remarkup-list-item">create mpris Player instance on a paired computer and set the <tt style="background: #ebebeb; font-size: 13px;">mpris:artUrl</tt> to the served address where this image is available</li>
<li class="remarkup-list-item">open kde connect android app, select prepared player and see default cover art instead of the served image</li>
<li class="remarkup-list-item">change artUrl to some image from the web</li>
<li class="remarkup-list-item">check in kde connect again and see it correctly show a remote image</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R225 KDE Connect - Android application</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21247">https://phabricator.kde.org/D21247</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>AndroidManifest.xml<br />
res/xml/network_security_config.xml</div></div></div><br /><div><strong>To: </strong>cotko, KDE Connect<br /><strong>Cc: </strong>kdeconnect, ewentzel, dshelley, pawelkwiecinski, ctakano, vporvaznik, mschroeder, varunp, shivanshukantprasad, skymoore, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, domson, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, lemuel, menasshock, mikesomov, tctara, apol<br /></div>