Commit Graph
276 Commits
Author SHA1 Message Date
Andrew DeMaria 570abe69d5 Merge remote-tracking branch 'airsonic/pr/939' 2019-03-31 19:29:39 -04:00
Andrew DeMaria d5500ce3d2 Merge remote-tracking branch 'airsonic/pr/941' 2019-03-31 19:24:26 -04:00
Andrew DeMaria 41a5ae06d5 Merge remote-tracking branch 'airsonic/pr/922' 2019-03-31 19:20:33 -04:00
Andrew DeMaria 6613bd86d5 Merge remote-tracking branch 'airsonic/pr/907' 2019-03-31 19:19:44 -04:00
jvoisin ba6b39b7b2 Add two <meta> tags
- Add a description, since this can be useful
  in browser's histories
- Add a viewport, making it less worse to use
  airsonic on a super-small screen
2019-03-31 23:55:24 +02:00
jvoisin 883022d81a Remove script.aculo.us dependency
It's not used anywhere, using an old version,
and the project doesn't seem to be maintained anyway.
2019-03-30 11:09:42 +01:00
jvoisin 910802b64f Fix a small resource leak 2019-03-29 00:18:25 +01:00
jvoisin a6c92acb3e Update mediaelement from 4.1.1 to 4.2.9
I've tested this on mp3, ogg and flac, everything
is working.

Apart from fixing a decent amount of bugs
(https://github.com/mediaelement/mediaelement/releases),
this has the nice side effect of removing a copy
of jquery 1.9.1.
2019-03-29 00:00:47 +01:00
jvoisin 2f9046d6b4 Fix a xss and clean up some js
- Fix a stupid self-XSS. I doubt that there are ways to
  use it against other users, but well, better safe than sorry
- Replace the javascript-on-focus hacks with the `autofocus` attribute
2019-03-28 23:38:37 +01:00
jvoisin 61c842923a Generate new passwords in a secure way
Previously, lost passwords were generated via
org.apache.commons.lang.RandomStringUtils,
which is using java.util.Random internally.

This PRNG is has a 48-bit seed, that can easily be bruteforced
if an attacker is able to get the PRNG's output, for example
but resetting their own account multiple times,
leading to trivial privileges escalation attacks.

This commit makes use of java.security.SecureRandom
instead.
2019-03-28 21:47:57 +01:00
jvoisin 39b9eab715 Simplify a bit the css 2019-03-26 23:08:50 +01:00
jvoisin 0b72acefed Oups 2019-03-26 23:04:32 +01:00
jvoisin fa5ffdc07a Remove the external fonts usage
This is a radical (and simple) solution
to #853, #399, #439, #174 and partially #712.
2019-03-26 21:30:45 +01:00
Andrew DeMaria e76d44d957 Merge remote-tracking branch 'origin/pr/908' 2019-03-26 13:59:48 -06:00
jvoisin 30fa4d0467 Second pass of trivial modernizations
- Replace unnecessary getters/setters with inline assignments
- Simplify string constructions
- Improve containers construction
2019-03-26 00:00:21 +01:00
jvoisin ca489f8220 This is a first batch of simple modernization of the codebase
I threw airsonic at IntelliJ's IDEA analysis,
and asked it to flag what could be modernized
for Java > 5.

- foreach instead of for…
- I added some null-deref checks
- Integer.ValueOf, since Integer(…) is deprecated
- Contextual try
- Objects.equals instead of handcrafted comparisons
- StringBuilder instead of StringBuffer
- Removal of outdated/wrong javadoc comments
2019-03-25 23:33:03 +01:00
jvoisin 45ef973627 Fix a javascript null-deref
This commit should fix the following javascript crash that
may occur if the localstorage isn't available/supported by the browser:

```
more.view:140 Uncaught TypeError: Cannot read property 'playCountValue' of null
    at loadShuffleForm (more.view:140)
    at HTMLDocument.<anonymous> (more.view:181)
    at n (jquery-1.7.1.min.js:2)
    at Object.fireWith (jquery-1.7.1.min.js:2)
    at Function.ready (jquery-1.7.1.min.js:2)
    at HTMLDocument.B (jquery-1.7.1.min.js:2)
```

Signed-off-by: jvoisin <julien.voisin@dustri.org>
2019-03-22 06:10:20 +01:00
jvoisin 4de26ac319 Remove pngfix
pngfix.js is used for compatibility's reason
with IE 5 and 6. I think that now that we're in 2019,
we can get rid of it.

Signed-off-by: jvoisin <julien.voisin@dustri.org>
2019-03-20 21:59:52 +01:00
jvoisin f501bfd5e1 Remove momentjs
MomentJS was only used in a single javascript function,
to do Seconds → (Minutes, Seconds). This commit
replaces this with a hand-rolled version, and removes
MomentJS.

Signed-off-by: jvoisin <julien.voisin@dustri.org>
2019-03-20 21:55:39 +01:00
Andrew DeMaria 143a220719 Merge remote-tracking branch 'airsonic/pr/849'
Conflicts:
	airsonic-main/cve-suppressed.xml
	airsonic-main/src/main/java/org/airsonic/player/controller/JAXBWriter.java
	airsonic-main/src/main/java/org/airsonic/player/service/PodcastService.java
	pom.xml
2019-03-16 19:27:53 -04:00
Andrew DeMaria 0d78c30d06 Change a couple more log entries to debug 2019-03-16 12:56:57 -04:00
François-Xavier Thomas 2c1b5205e8 Write new db maintenance logs as 'debug' instead of 'info' 2019-03-16 17:32:00 +01:00
François-Xavier Thomas 7510b04efc Make checkpoint() method void (return value is not used) 2019-03-16 17:29:00 +01:00
François-Xavier Thomas 8c46d39569 Do not log message about hsqldb-defrag migration on each launch
The FILES DEFRAG / FILES LOG SIZE properties are kept when upgrading to
2.x; it's enough that they were set once on 1.8. For new installations
the migration will still run with the correct SQL statements.
2019-03-10 20:53:56 +01:00
François-Xavier Thomas b753e48632 Log more information when running the 'cleanup db' action 2019-03-09 13:33:59 +01:00
François-Xavier Thomas 76e8abd219 Move HSQLDB checkpoint/shutdown to a bean specific to the legacy profile 2019-03-09 13:33:59 +01:00
François-Xavier Thomas b88bdb37c9 Properly shutdown embedded HSQLDB database on exit 2019-03-08 23:48:32 +01:00
François-Xavier Thomas 54e444b03c Make CHECKPOINT / DEFRAG syntax work for both HSQLDB 1 & 2 2019-03-08 22:40:05 +01:00
Iwao AVE!andFrançois-Xavier Thomas c79c02d449 Updated CHECKPOINT / DEFRAG syntax for HSQLDB 2.
Signed-off-by: Iwao AVE! <harawata@gmail.com>
2019-03-08 22:40:05 +01:00
François-Xavier Thomas c0f3606091 Force database checkpoints on 'Clean-up' and 'Scan' actions
This will only affect the (embedded/legacy) HSQLDB driver. Even though
cff97ea9 should prevent the db log from getting uncontrollably large,
the 'Clean-up database' and 'Scan' actions will additionally force a
checkpoint to ensure this happens on big operations.
2019-03-08 22:40:05 +01:00
Andrew DeMaria 1a88f46c18 CVE-2018-20222 Prevent xxe during parse
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-02-18 22:46:05 -05:00
Andrew DeMaria e4bb808862 Merge remote-tracking branch 'origin/pr/869' 2019-02-16 10:46:18 -07:00
tesshuandAndrew DeMaria 6023d4c0bc fix #748 2019-02-16 10:38:47 -07:00
jo 7327353704 Pull translations from transifex 2019-01-25 04:40:03 +01:00
Andrew DeMaria adc224147a Merge remote-tracking branch 'airsonic/pr/855' 2019-01-09 21:02:23 -05:00
Andrew DeMaria 5e14996dc3 Merge remote-tracking branch 'airsonic/pr/859' 2019-01-09 20:59:14 -05:00
Frank de LangeandAndrew DeMaria 8127b4f7fa Fix #860 (external database performance) by using connection pooling … (#864)
* Fix #860 (external database performance) by using connection pooling (using commons-dbcp2)
2019-01-09 19:53:52 -06:00
François-Xavier Thomas d6ba6de7e1 Run a first defrag before enabling auto defrag on HSQLDB 2019-01-09 22:27:40 +01:00
François-Xavier Thomas 21eff917b6 PlayQueue: Fix broken keyboard shortcuts
Using the "space" key to resume playback, as well as +/- to
increase/decrease volume, were not working properly.
2019-01-09 21:28:40 +01:00
Andrew DeMaria ac0e29bf9c Remove unused import 2019-01-08 21:57:23 -05:00
Andrew DeMaria 61c0c0d758 Fix import style error 2019-01-08 21:56:26 -05:00
François-Xavier Thomas cff97ea9be Fix #778: Defragment embedded HSQLDB database more frequently 2019-01-03 20:47:15 +01:00
Rémi Cocula ac453883fc jukebox code quality and unit tests 2018-12-22 13:59:44 +01:00
randomnicode f2339e0942 Change zip to java.util 2018-12-15 08:27:54 -08:00
randomnicode 86e58cea3a Update dependencies in airsonic-main 2018-12-14 23:27:51 -08:00
Andrew DeMaria fb18862db4 Fix extraneous closing tag 2018-12-09 23:59:31 -05:00
Andrew DeMaria cddacb61c2 Merge remote-tracking branch 'airsonic/pr/834' 2018-12-09 23:48:49 -05:00
Andrew DeMaria 4d56df06ba Merge remote-tracking branch 'airsonic/pr/844' 2018-12-09 23:40:31 -05:00
Benz0X af93f1eed1 Correct corrupted downloaded zip
Prevent the zipping of twice the same file (resulting in an error and a corrupted zip on Linux) when the cover is embedded in tags
2018-12-08 15:10:12 +01:00
Michel Néron 16b22f3501 - Correct test for use not a hardcoded value but the referenced value. The first in select on multi value didn't ordered is not assured. 2018-12-08 11:31:48 +01:00