5677 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
16a5ac32b7 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!785
2019-01-04 08:19:32 +00:00
Hans-Christoph Steiner
5ceaa95a34 Weblate 2019-01-04 08:19:32 +00:00
Hans-Christoph Steiner
12728d6101 Merge branch 'index-input-hardening' into 'master'
Index input hardening

See merge request fdroid/fdroidclient!784
2019-01-03 14:24:10 +00:00
Hans-Christoph Steiner
7bc7fa9288 rename LoggingQuery.query() to rawQuery() to make audits easier
rawQuery() is much more dangerous, so this method should have the
same name as the method it is actually calling.

https://f-droid.org/docs/Second_Audit_Report/#f47--fdroidclient-raw-sql-query-executions
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
1deec1c9b3 sanitize all packageNames from the index
This is insurance to make sure that packageNames are not abused for
exploiting F-Droid.  The database queries already use SQL Prepared
Statements, but who know what else might be exploitable.

fdroid/fdroidclient#1588
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
26c1ef3033 move RepoXMLHandler to org.fdroid.fdroid.data
This should be lumped with the classes it uses.
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
9c8cc20a80 validate all data in repo push requests
This should get us closer towards not having to trust the server.

fdroid/fdroidclient#1588

https://stackoverflow.com/questions/5205339/regular-expression-matching-fully-qualified-class-names/5205467
2019-01-03 14:52:32 +01:00
Hans-Christoph Steiner
9a04ce4332 Merge branch 'fix-screenshot-background' into 'master'
fix screenshot background for all themes in app details

Closes #1618

See merge request fdroid/fdroidclient!782
2019-01-03 13:34:03 +00:00
Hans-Christoph Steiner
d111d0a0d8 Merge branch 'small-localization-fixes' into 'master'
Small localization fixes

See merge request fdroid/fdroidclient!783
2019-01-02 23:00:26 +00:00
Hans-Christoph Steiner
a4e80383f9 when index updates fail, try to get localized exception message 2019-01-02 23:23:28 +01:00
Hans-Christoph Steiner
823ddcaca8 use separate titles for Updates pref and Updates tab
https://gitlab.com/fdroid/fdroidclient/merge_requests/773#note_127475129
2019-01-02 23:23:28 +01:00
Hans-Christoph Steiner
4cc5d58480 Merge branch 'collection-of-lint-and-code-cleanups' into 'master'
Collection of lint and code cleanups

See merge request fdroid/fdroidclient!780
2019-01-02 22:23:08 +00:00
Conny Duck
e3a24a042d fix screenshot background for all themes in app details 2019-01-02 19:33:59 +01:00
Hans-Christoph Steiner
079cf2e903 enable lint HardwareIds as error
Keep PRNGFixes as it is since it is security sensitive, standardized
code from Google.  While F-Droid never wants to do anything with
hardware IDs at all, this code uses the Build.SERIAL as a seed for the
random number generator, so it is safe privacy-wise.
2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
09abc0734e format code in PRNGFixes 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
cf5b9520fb fix lint "Implied locale in date format" 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
77a4ad4cc9 set lint "Typos" to be an error to catch translation issues 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
178371bf54 fix typos in translations caught by lint 2019-01-02 15:40:38 +01:00
Hans-Christoph Steiner
71920f6082 use Cols.ROW_ID/Cols._ID for all "rowid"/"_id" strings 2019-01-02 15:40:27 +01:00
Hans-Christoph Steiner
bce35ef865 remove unused methods in database code to make auditing easier
These were flagged as potential vulnerabilities.
2019-01-02 15:40:27 +01:00
Hans-Christoph Steiner
7fbfa46e18 Merge branch 'library-updates' into 'master'
some safe library version bumps

See merge request fdroid/fdroidclient!779
2018-12-31 19:12:44 +00:00
Hans-Christoph Steiner
309694458b some safe library version bimps
This is a collection of minor version updates for included libraries
that should be safe to do.  Doing this at the very beginning of the
release cycle so they'll be tested.

thanks @TacoTheDank for finding these

fdroid/fdroidclient!776

Some related changelogs:
* https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8.11
* https://github.com/jmdns/jmdns/releases
2018-12-31 17:36:33 +01:00
Hans-Christoph Steiner
f799d24f1d version code 1005050 1.5 2018-12-26 00:42:11 +01:00
Hans-Christoph Steiner
e5121dc508 update CHANGELOG 2018-12-26 00:42:03 +01:00
Hans-Christoph Steiner
945dbdbd3c prevent NPE in Bluetooth swap
ACRA  E  ACRA caught a IllegalStateException for org.fdroid.fdroid.debug
                         E  java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
                         E      at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
                         E      at android.os.Handler.handleCallback(Handler.java:751)
                         E      at android.os.Handler.dispatchMessage(Handler.java:95)
                         E      at android.os.Looper.loop(Looper.java:154)
                         E      at android.app.ActivityThread.main(ActivityThread.java:6128)
                         E      at java.lang.reflect.Method.invoke(Native Method)
                         E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
                         E  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a
                            null object reference
                         E      at org.fdroid.fdroid.localrepo.peers.BonjourPeer.hashCode(BonjourPeer.java:41)
                         E      at sun.misc.Hashing.singleWordWangJenkinsHash(Hashing.java:48)
                         E      at java.util.HashMap.put(HashMap.java:423)
                         E      at java.util.HashSet.add(HashSet.java:217)
                         E      at rx.internal.operators.OperatorDistinct$1.onNext(OperatorDistinct.java:62)
                         E      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:202)
                         E      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:162)
                         E      at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
                         E      ... 7 more
2018-12-26 00:29:19 +01:00
Hans-Christoph Steiner
8ce4882c1d Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!777
2018-12-25 23:05:19 +00:00
Hans-Christoph Steiner
b264688385 Weblate 2018-12-25 23:05:19 +00:00
Hans-Christoph Steiner
e4537a4271 Merge branch 'clean-up-sdcard-swap' into 'master'
Clean up sdcard swap

See merge request fdroid/fdroidclient!775
2018-12-25 22:32:23 +00:00
Marcus
928042540f Merge branch 'fix_iconquery' into 'master'
Fix iconquery

Closes #1108

See merge request fdroid/fdroidclient!715
2018-12-23 11:06:16 +00:00
Peter Serwylo
da9eba94eb Remove unused parameter from app provider, after updating icon query 2018-12-22 19:39:03 +11:00
Peter Serwylo
d82023b943 Add test for loading app icons from correct repository 2018-12-22 19:34:23 +11:00
Hans-Christoph Steiner
7f9bfd38a1 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidclient!774
2018-12-21 23:10:37 +00:00
Hans-Christoph Steiner
fc474ddf58 Weblate 2018-12-21 23:10:37 +00:00
Marcus Hoffmann
4595517aba AppProvider: fix IconUpdateQuery
The query was trying to figure out some thing about suggestedVercode
which shouldn't at all be necessary for setting the iconUrl.
The index already contains the icon pointing to the suggested version by
that repository, so we just take that regardless.
2018-12-22 09:40:16 +11:00
Marcus Hoffmann
43e5ab7eb2 fix typoes in comments 2018-12-22 09:40:16 +11:00
Hans-Christoph Steiner
0a306a4df2 after requesting Storage permissions, start SDCard scan 2018-12-21 23:06:10 +01:00
Hans-Christoph Steiner
c97424f054 show Toast when scanning an SDCard for repos 2018-12-21 23:06:04 +01:00
Hans-Christoph Steiner
43ee48ac2b only show "SDCards can be used to swap" if an SD Card is present 2018-12-21 23:05:24 +01:00
Hans-Christoph Steiner
20ebc00e5e improved log warning about TargetSdkVersion mismatch 2018-12-21 23:03:08 +01:00
Hans-Christoph Steiner
9c8c3380c1 Merge branch 'update-bottombar-translations' into 'master'
Update BottomBar translations

Closes #1569 and #887

See merge request fdroid/fdroidclient!773
2018-12-21 22:01:07 +00:00
Hans-Christoph Steiner
30c4a26145 Merge branch 'bottom-bar-overhaul' into 'master'
remove text animation from BottomBar so more text fits in the labels

Closes #1569

See merge request fdroid/fdroidclient!772
2018-12-21 21:57:06 +00:00
Hans-Christoph Steiner
4b30b42e16 add "Updates" translation to kn from Android strings 2018-12-21 17:16:28 +01:00
Hans-Christoph Steiner
0a4ee45083 sync up "Categories" translation with Android standard strings
fdroid/fdroidclient#1569
2018-12-21 17:16:25 +01:00
Hans-Christoph Steiner
3868b81587 sync up "Settings" translation with Android standard strings
fdroid/fdroidclient#1569

```python
import glob
import os
import re

locale_pat = re.compile(r'.*values-([a-z][a-z][a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="settings_label"[^>]*>"?([^"<]*).*')
for f in glob.glob('/home/hans/code/android.googlesource.com/packages/apps/Settings/res/values-[a-z][a-z]*/strings.xml'):
    m = locale_pat.search(f)
    if m:
        locale = m.group(1)
        if locale.endswith('-nokeys'):
            continue
    #print(locale)
    with open(f) as fp:
        m = translation_pat.search(fp.read())
        if m:
            word = m.group(1)
            print(locale, '\t', word)
            fdroid = '/home/hans/code/fdroid/client/app/src/main/res/values-' + locale + '/strings.xml'
            if os.path.exists(fdroid):
                with open(fdroid) as fp:
                    data = fp.read()
                with open(fdroid, 'w') as fp:
                    fp.write(re.sub(r'menu_settings">[^<]+</string', 'menu_settings">' + word + '</string', data))
```
2018-12-21 17:07:41 +01:00
Hans-Christoph Steiner
c031f49ede sync up "Nearby" translation with Android standard strings
fdroid/fdroidclient#1569
fdroid/fdroidclient#887

```python
import glob
import os
import re

locale_pat = re.compile(r'.*values-([a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="corpus_name_websearch_nearby">([^<]*).*')
for f in glob.glob('/tmp/Velvet/res/values-*/strings.xml'):
    m = locale_pat.search(f)
    if m:
        locale = m.group(1)
    with open(f) as fp:
        m = translation_pat.search(fp.read())
        if m:
            word = m.group(1)
            print(locale, '\t', word)
            fdroid = '/home/hans/code/fdroid/client/app/src/main/res/values-' + locale + '/strings.xml'
            if os.path.exists(fdroid):
                with open(fdroid) as fp:
                    data = fp.read()
                with open(fdroid, 'w') as fp:
                    fp.write(re.sub(r'main_menu__swap_nearby">[^<]+</string', 'main_menu__swap_nearby">' + word + '</string', data))
```
2018-12-21 17:07:40 +01:00
Hans-Christoph Steiner
38e0b8d29d update language to reflect "nearby" usage
closes #887
2018-12-21 17:07:40 +01:00
Hans-Christoph Steiner
e0f346d4b4 fix repo tests after change in mirror list logic
Why didn't these tests fail earlier?

this should have been included in ac1a5e0ad8bed1c658885c8f6142367a3812815d
fdroid/fdroidclient!769
2018-12-21 15:26:02 +01:00
Hans-Christoph Steiner
ae0c712a3e remove animation from BottomBar to make more text fit into labels
For many languages, there are unavoidable long words needed for the labels
on the button bar, for example, the standard word for Settings can be up to
15 characters long:
https://gitlab.com/fdroid/fdroidclient/issues/1569#note_126469088

The BottomBar was scaling the active one up, and sizing all the fields based
on that size.  This removes that animation, and sets all tabs to always have
the same text size.  That makes it possible to make the spacing tighter.
This also sets the text truncating mode to "middle" which sticks an elipsis
in the middle of the truncated word and shows the start and end.

closes #1569
closes !756
2018-12-21 14:27:57 +01:00
Hans-Christoph Steiner
59befbd355 use Android constants for common URI schemes
This makes the code easier to trace.
2018-12-21 14:27:57 +01:00
Hans-Christoph Steiner
d8e8cc82f1
version code 1005002 1.5-alpha2 2018-12-21 00:25:56 +01:00