fdroidserver has always written "sha256" to the index.xml file, so client
should use the same. The Java hashers will correctly respond to both
"sha256" and "SHA-256", and the only place that the hashType is read from
the DB and used is in the swap repo index.xml generation, where it should
also use "sha256".
java.lang.Throwable: Explicit termination method 'end' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at java.util.zip.Deflater.<init>(Deflater.java:171)
at kellinwood.zipio.ZioEntryOutputStream.<init>(ZioEntryOutputStream.java:35)
at kellinwood.zipio.ZioEntry.getOutputStream(ZioEntry.java:482)
at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:759)
at kellinwood.security.zipsigner.ZipSigner.signZip(ZipSigner.java:664)
at org.fdroid.fdroid.localrepo.LocalRepoKeyStore.signZip(LocalRepoKeyStore.java:213)
at org.fdroid.fdroid.localrepo.LocalRepoManager.writeIndexJar(LocalRepoManager.java:492)
at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:759)
at org.fdroid.fdroid.views.swap.SwapWorkflowActivity$PrepareSwapRepo.doInBackground(SwapWorkflowActivity.java:709)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
E StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
ARM emulators are too slow to run these tests in a useful way. The
sad thing is that it would probably work if Android didn't put up the
ANR "Process system isn't responding" on boot each time. There seems
to be no way to increase the ANR timeout.
Sometimes the test suite just totally bombs out and fails on every single
job with the same Robolectric crash. Adding this line seems to fix it.
https://github.com/robolectric/robolectric/issues/3846
Here's the error:
java.lang.VerifyError: class org.robolectric.android.fakes.RoboMonitoringInstrumentation overrides final method specifyDexMakerCacheProperty.()V
NanoHTTPD has issues with HTTP Keep-Alive, especially when other requests
are mixed in, like the /request-swap POST or perhaps the F-Droid HEAD to
fetch the ETag before the GET.
This disables gzip encoding and sets a Content Security Policy while I'm at
it. APKs, PNGs, and JARs are already compressed, so gzip would only ever
cause problems. And the index page is meant to be viewed by browsers, so
having a CSP will limit potential malicious swap activity.
The webserver was totally broken since nanohttpd had changed so much since
the swap webserver was implemented. This syncs up with the sample file and
gets rid of our hacks. The only differences now are the stuff that is
removed since it is totally unused in F-Droid. This also adds a full test
suite.
this actually closes#248
The MIME Types only need to be set on files that we are actually using to
display in the browser. All others should not be set so that they cannot
be abused.
This is a quick hack to reuse the Latest view with a slightly simpler
layout. It makes the "basic" flavor fully functional as an fdroid client.
The goal here is just to have something simpler with as little new code as
possible. It is essential that the whitelabeling and "Light" aka "basic"
flavor does not increase the maintenance load.
closesfdroid/fdroidclient#48fdroid/fdroidclient!692fdroid/fdroidclient!695