Cannot upload image on mastodon that cloudflare protected such as mstdn.jp
Issue
Hi, there has mastodon instance uses Cloudflare to avoid attacks. Fedilab success fetching statuses, login and others data from mastodon instance's API except Upload images. I also check Tusky but it seems work well :( Maybe there should include/exclude some parameters to process it?
Reproduce steps
- Switch/login to a Cloudflare protected instance such as mstdn.jp
- Open TootActivity and ready to compose.
- click the upload image
- select image
- pass image back to TootActivity
- start unloading untill 100%
- stuck at 100% a few seconds
- throw error toast message
Logs
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: app.fedilab.android.client.HttpsConnection$HttpsConnectionException: Attention Required! | Cloudflarebody{margin:0;padding:0}
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: Please enable cookies.
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: One more step
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: Please complete the security check to access mstdn.jp
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: Why do I have to complete a CAPTCHA?
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: What can I do to prevent this in the future?
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: Cloudflare Ray ID: 4e081819bd278536 • Your IP: 168.70.113.26 • Performance & security by Cloudflare • Select a LanguageEnglishEspañol
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: window._cf_translation = {}; window._cf_translation.locale = 'en'; window._cf_translation.blobs = {};
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: at app.fedilab.android.client.HttpsConnection$4.run(HttpsConnection.java:1347)
2019-06-02 16:36:24.959 21369-29280/fr.gouv.etalab.mastodon W/System.err: at java.lang.Thread.run(Thread.java:764)
effected Instance
mstdn.jp
-
Mastodon -
Pleroma -
Peertube -
GNU Social -
Friendica -
Pixelfed
Version
Fedilab: 2.3.1
Android: 9