simlar-android icon indicating copy to clipboard operation
simlar-android copied to clipboard

Network Type may not be being verified

Open caev03 opened this issue 3 years ago • 0 comments

Dear Developer!

My name is Camilo Escobar, I am a PhD Student at Universidad de los Andes, Colombia. I am part of a research on the usage of network libraries within android apps. As a result of this we identified that there is a missing validation of network type within a method since some network operations are being performed in it. As you might know, a device can have various types of network connections. For the full list of possible network types, see https://developer.android.com/reference/android/net/ConnectivityManager. Therefore it is recommended for the app to identify the type of network available before performing a network operation.

Note: Wi-Fi is typically faster. Also, mobile data is often metered, which can get expensive. A common strategy for apps is to only fetch large data if a Wi-Fi network is available.

In order to address this issue we recommend you to visit:

  1. https://developer.android.com/training/basics/network-ops/managing
  2. https://developer.android.com/training/efficient-downloads/connectivity_patterns

Potential Code Location without Network type validation

https://github.com/simlar/simlar-android/blob/6af259d2c9c52dba69f508878679e21c77c484d4/app/src/main/java/org/simlar/https/HttpsPost.java#L79-L85

caev03 avatar Aug 16 '21 13:08 caev03