From 38680d84e35ec309f1101b639d9854a1c88a44f3 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 30 Mar 2016 16:36:53 +0200 Subject: [PATCH] update some javadoc --- app/src/main/java/org/fdroid/fdroid/compat/FileCompat.java | 6 ++++++ app/src/main/java/org/fdroid/fdroid/net/Downloader.java | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/compat/FileCompat.java b/app/src/main/java/org/fdroid/fdroid/compat/FileCompat.java index aae28192c..4f0031ac7 100644 --- a/app/src/main/java/org/fdroid/fdroid/compat/FileCompat.java +++ b/app/src/main/java/org/fdroid/fdroid/compat/FileCompat.java @@ -11,6 +11,12 @@ import org.fdroid.fdroid.data.SanitizedFile; import java.io.IOException; import java.lang.reflect.Method; +/** + * This class works only with {@link SanitizedFile} instances to enforce + * filtering of the file names from files downloaded from the internet. + * This helps prevent things like SQL injection, shell command injection + * and other attacks based on putting various characters into filenames. + */ public class FileCompat extends Compatibility { private static final String TAG = "FileCompat"; diff --git a/app/src/main/java/org/fdroid/fdroid/net/Downloader.java b/app/src/main/java/org/fdroid/fdroid/net/Downloader.java index 99bf0dd7e..180d3aebd 100644 --- a/app/src/main/java/org/fdroid/fdroid/net/Downloader.java +++ b/app/src/main/java/org/fdroid/fdroid/net/Downloader.java @@ -117,11 +117,6 @@ public abstract class Downloader { } /** - * In a synchronous download (the usual usage of the Downloader interface), - * you will not be able to interrupt this because the thread will block - * after you have called download(). However if you use the AsyncDownloadWrapper, - * then it will use this mechanism to cancel the download. - * * After every network operation that could take a while, we will check if an * interrupt occured during that blocking operation. The goal is to ensure we * don't move onto another slow, network operation if we have cancelled the