Commit Graph
100 Commits
Author SHA1 Message Date
jvoisin 0e8056c06a Minor refactoring in theme resolver
This should please our beloved static analysers,
and speed up by _at least_ 0.2ms the themes
selector loading time!
2020-01-05 21:40:19 +01:00
jvoisin af97925124 Rename some exceptions to ignored since we don't care about them 2019-11-23 15:50:22 +01:00
jvoisin 6d092286e3 Remove openjdk-ea for now
It's breaking the build in weird ways, we
can always add it back later.
2019-10-25 17:55:52 +02:00
jvoisin fd1b154a3c Simplify a bit a function
Credit goes to eharris@
2019-10-24 21:42:50 +02:00
jvoisin 1bc5729cfb Remove the parseLocale function in SettingsService 2019-10-24 21:42:50 +02:00
jvoisin d2ad85447b Remove the unused md5Hex method 2019-10-24 21:42:50 +02:00
jvoisin d07d0ad687 Tighten en exception 2019-10-24 21:42:50 +02:00
jvoisin e1a8a3b752 Use a switch-case instead of if-spaghettis 2019-10-24 21:42:50 +02:00
jvoisin 6b54086590 Remove an unused method 2019-10-24 21:42:50 +02:00
jvoisin 332718386b Simplify the parseInts method 2019-10-24 21:42:50 +02:00
jvoisin 29b083ddac Simplify the split method
Use a regexp with two groups, instead of
doing some black magic manually.
2019-10-24 21:42:50 +02:00
jvoisin e1583691d8 Replace StringUtil.toHtml with StringEscapeUtils.escapeHtml
Apache commons is providing Html-escaping, no need to reinvent the wheel:

> It supports all known HTML 4.0 entities, including funky accents. Note that the
> commonly used apostrophe escape character (') is not a legal entity and so
> is not supported).

So I manually checked that nothing is relying on escaped single-quotes,
and didn't manage to find anything that does.
2019-10-24 21:42:50 +02:00
jvoisin 9dc9cbd821 Remove the unused toISO8601 method 2019-10-24 21:42:50 +02:00
jvoisin 0c0561d104 Bump apache's cxf 2019-10-20 23:50:59 +02:00
jvoisin 599eb8574d Bump OWASP's maven dependency's check 2019-10-20 22:55:34 +02:00
jvoisin f910c572c9 Use a static access in a test file, because we can. 2019-10-20 22:43:10 +02:00
jvoisin a4cc1ec6ec Bump jackson to a proper release 2019-10-20 22:27:36 +02:00
jvoisinandAndrew DeMaria d17c00115a Minor refactor of CsrfSecurityRequestMatcher
- use plain string comparison instead of regexp
- Simplify data structures

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-15 21:15:55 -06:00
jvoisin af28e7c257 Fix the syntax for sunfire's exclusion 2019-10-16 01:11:11 +02:00
jvoisin 78480ab766 Remove a homemade implementation of Pair
Since apache-commons is already implementing a Pair
type, there is no need to reinvent the wheel.
2019-10-13 23:36:33 +02:00
jvoisin c25e26d61a Remove a dead file 2019-10-12 13:07:35 +02:00
jvoisin 06e36ff154 Mark a field as private
Since we're synchronising on playQueue, we should make
it final.
2019-10-12 12:55:58 +02:00
jvoisin b6414ebb6c Simplify a condition 2019-10-11 23:27:53 +02:00
jvoisin 9f027f333e Upgrade PlaylistService to non-deprecated methods
As documented here: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/util/Assert.html#notNull-java.lang.Object-java.lang.String-
2019-10-11 22:17:42 +02:00
jvoisinandAndrew DeMaria 6f590f7740 Check the return value of delete calls
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-08 00:39:16 -06:00
jvoisinandAndrew DeMaria 42b4aaafc7 Use EnumMap in IndexManager
EnumMap are _much_ more efficient than HashMaps,
so we should use them if we can.

See here for more details: https://docs.oracle.com/javase/8/docs/api/java/util/EnumMap.html

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-08 00:29:03 -06:00
jvoisin 1a7bb68dc6 Remove a leftover of the Radexo removal
This is a followup of 85e0e08d9a
2019-10-07 17:11:42 +02:00
jvoisin da34bf0d3f Improve Windows system detection
Use apache commons instead of terrifyingly fragile black magic.
2019-10-07 01:16:34 +02:00
jvoisinandAndrew DeMaria bf5e8ef247 Add coverity to travis-ci
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-06 16:13:25 -06:00
jvoisinandAndrew DeMaria 85e0e08d9a Remove radeox
Radeox is a rendering engine for an unspecified markup.
Its [website](http://radeox.org/) is dead, the website
of its [authors](http://www.codehaus.org/) is dead too,
its [last commit](https://github.com/codehaus/radeox) was 13 years ago.

It's only used for the welcome and login messages,
as well as comments from users. If we want to have some markup parsing,
we should use something maintained with autoescaping guarantees,
instead of a piece of zombie code prone to $DEITY knows what injections.

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-06 16:02:46 -06:00
jvoisinandAndrew DeMaria e5404648a4 Remove unnecessary exceptions and unused imports
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-06 16:00:29 -06:00
jvoisinandAndrew DeMaria dddf8dc0aa Fix some javadoc comments
- Remove a dangling comment
- Delete half-documented parameters
- Fix some @see/@link

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-06 15:37:54 -06:00
jvoisin 889add6848 More lambdaification 2019-10-06 15:00:34 +02:00
jvoisin 362cf29e41 Fix some javadoc comments
- Remove a dangling comment
- Delete half-documented parameters
- Fix some @see/@link
2019-10-06 14:30:21 +02:00
jvoisinandAndrew DeMaria 5c1451b904 Bump Spring
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:57:33 -06:00
jvoisinandAndrew DeMaria dd1e0181d1 Please checkstyle
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:48:00 -06:00
jvoisinandAndrew DeMaria af05b0f45b Use lambdas instead of ghetto nested types
This change was done in an automated fashion
via IntelliJ IDEA

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:47:48 -06:00
jvoisinandAndrew DeMaria 9cbcc94b58 Bump ehcache
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:44:29 -06:00
jvoisinandAndrew DeMaria 25327c69cc Replace deprecated IOUtils.closeQuietly calls
Use FileUtil.closeQuietly instead, since it's our reimplemented of this deprecated method.
This change was done automatically via IntelliJ IDEA.

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:39:10 -06:00
jvoisinandAndrew DeMaria c6ae5a1df7 Use computeIfAbsent instead of an if
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 19:01:53 -06:00
jvoisinandAndrew DeMaria 888204ffe7 Remove an unused import
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-10-05 18:58:28 -06:00
jvoisin c0beca6a58 Use removeIf instead of doing this manually 2019-10-05 19:43:47 +02:00
jvoisin 5593275a5a Fix the CSS for groove_simple
Previously, the css pointed to a non-existent
file path for the background.
2019-09-30 23:05:07 +02:00
jvoisin bc832d0034 Use a constant for encoding
Replace string.getBytes("UTF-8") with
string.getBytes(CONSTANT).
2019-09-21 18:16:40 +02:00
jvoisin 53d835e6ed Make the logout icon/image cliquable
This should close #1178
2019-09-19 20:49:45 +02:00
jvoisinandAndrew DeMaria c6540d707e Simplify a bit the annotations
There is no need to specify `value` every single time

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-10 13:51:35 -06:00
jvoisinandEvan Harris eb4c5a04ff Make the systemd unit compatible with tomcat9
- Use ReadWritePaths by default, since it doesn't
  cause any harm
- Rephrase the ProtectSystem comment, to make it more clear
- Fix verbs in a comment
2019-09-03 04:54:43 -05:00
jvoisin 6f57c6e313 Remove an unused/unuseable/half-done cache 2019-09-01 18:11:48 +02:00
jvoisin 46d806df1d Fix two issues found by LGTM 2019-09-01 18:11:48 +02:00
jvoisin c0fa01206a Ignore yet an other jackson vulnerability 2019-09-01 18:11:48 +02:00
jvoisin 49c6e89f73 Ignore CVE-2019-14439 too 2019-08-07 02:09:52 +02:00
jvoisin 8260fed1b3 Ignore CVE-2019-14379 2019-08-07 01:57:54 +02:00
jvoisin b650ac70d6 Temporarily skip a test
Based on tesshucom's #1192
2019-08-07 01:52:17 +02:00
jvoisin 4a85cdbc7a Sort the checkstyle modules 2019-08-01 10:46:26 +02:00
jvoisin 0d6ed81b83 Add a check for InnerAssignment in checkstyle.xml 2019-08-01 10:36:51 +02:00
jvoisin ba9d3ff539 Remove an empty statement 2019-08-01 10:30:26 +02:00
jvoisin 61c8fbc5e2 Add more style checks 2019-08-01 10:21:54 +02:00
jvoisin 10b41160c0 Enabled StringLiteralEquality in CheckStyle 2019-07-31 00:26:58 +02:00
jvoisin 167d1d9c20 Enable EqualsHashCode in CheckStyle 2019-07-31 00:23:18 +02:00
jvoisin d256386cbb Use titles in some <img> tags 2019-07-22 22:49:11 +02:00
jvoisinandAndrew DeMaria eccb7e08f5 Fix a NULL-deref in CoverArtController.java
ImageIO.read() can return null in certain cases
2019-07-14 11:54:30 -06:00
jvoisinandAndrew DeMaria e9ea61036f First pass of CSP-compliance for mousetrap
Since the preference for the keyboard shortcuts
is set server-side, I had to shove them into a non-javascript
context, and then access them via javascript,
in a separate file.

Since I'm not a javascript expert, I'm more than open
to alternatives if this isn't the right way™ to do it.
2019-07-14 11:46:28 -06:00
jvoisin 967c32b92f Fix cucumber. 2019-07-03 22:20:56 +02:00
jvoisin c4b78828d7 Fix cucumber? 2019-07-03 22:20:21 +02:00
jvoisin 5961674944 Add openjdk12 to travis-ci 2019-07-03 00:15:29 +02:00
jvoisin 36985e151b Bump dependency checker 2019-07-03 00:06:53 +02:00
jvoisin 2d06995416 Remove the last mention of Flash in the translation files 2019-06-17 21:50:47 +02:00
jvoisin a27ad99f8d Remove an other Flash-related localization 2019-06-17 21:30:13 +02:00
jvoisin 67eae2893f Remove a localisation about getting flash player 2019-06-17 21:29:37 +02:00
jvoisin 9bd2c1e83f Fix various minor javascript-related warnings 2019-06-15 17:27:03 +02:00
jvoisin 1640411573 Fix some invalid/incomplete javadoc comments 2019-06-15 17:15:51 +02:00
jvoisin 8f4e351718 Add an alt attribute to images, to increase accessibility 2019-06-15 17:06:25 +02:00
jvoisin fc43364908 Fix a useless double-assignation 2019-06-12 00:21:06 +02:00
jvoisin b8d64c1dbd Bump the version of maven-checkstyle-plugin 2019-06-12 00:15:38 +02:00
jvoisin 4fbc080098 Please the linter 2019-06-12 00:11:39 +02:00
jvoisin 70bc0f6c04 Remove the ghetto REST flash-based video player 2019-06-12 00:09:02 +02:00
jvoisin 643be3930f Remove superfluous casts 2019-06-08 16:24:00 +02:00
jvoisin 3202a1086d Minor simplification
`.sorted(Comparator.reverseOrder()).findFirst()`
can be replaced with `max(Comparator.naturalOrder()`
2019-06-08 15:50:15 +02:00
jvoisin def5f854fb Inline some variables
There is no point in `Type a = …; return a;`
2019-06-08 15:47:15 +02:00
jvoisin 57df709cd8 Replace things like size == 0 with isEmpty 2019-06-08 15:40:51 +02:00
jvoisin e0ac46cf44 Fix 3 minor errors in jsp files
- Add a missing `$` in dlnaSettings
- Add a missing taglib import in homePage.jsp
- Add a missing `=` in playQueue.jsp's css
2019-06-08 15:29:46 +02:00
jvoisin 977b656bc6 Remove superfluous escape in two regexp 2019-06-08 15:21:59 +02:00
jvoisin 40f7c73390 Fix the video player that was broken in cf1f86f 2019-06-08 00:54:55 +02:00
jvoisin 3492fc0c05 Fix a crash when transcoding a track without album 2019-06-06 02:19:08 +02:00
jvoisin b1eb0536b8 Fix a crash when transcoding a track without artist 2019-06-06 02:17:10 +02:00
jvoisin e283ac46a8 Fix downloads with embedded covers
Previously, this would always fail with
embedded covers.
2019-06-06 02:14:10 +02:00
jvoisin b697dc5bfc An other batch of LGTM-found issues 2019-06-05 23:40:10 +02:00
jvoisin 40a5150b6e Don't use ProtectHome by default in the systemd unit
Some people might put media in /home/…/
2019-06-02 16:05:47 +02:00
jvoisin fe73034f10 Strip the <p>…</p> markup in translation
This was done via `find airsonic-main/src/main/resources/ -name
'ResourceBundle_*.properties' -print0 | xargs -0 sed -i
's/\(helppopup\..*\.text\)\s*=\s*<p>\(.*\)<\/p>/\1=\2/'`, courtesy of fxthomas.
2019-05-30 00:49:54 +02:00
jvoisin 01dd070efa Fix indentation 2019-05-30 00:49:35 +02:00
jvoisin 195a0879c3 Replace wz_tooltip.js with jquery-ui
Since we're already using jquery-ui for other stuff, it makes sense to use it
for tooltips too, instead of using an old-school-written-in-2009 1300 lines
  steaming pile of javascript named wz_tooltip.js
2019-05-29 23:39:25 +02:00
jvoisin f4fa75f808 Fix compat with the latest jquery
Stolen^w borrowed from https://github.com/keegnotrub/jquery.fancyzoom/issues/3#issue-388966769
2019-05-28 01:13:02 +02:00
jvoisin c5eb7aa37c Fix a typo 2019-05-28 01:08:27 +02:00
jvoisin 9a43b4f360 Group the .attr calls 2019-05-28 00:57:26 +02:00
jvoisin 7824c3099f Mention de license 2019-05-28 00:56:46 +02:00
jvoisin 15a1e5e7d6 Replace FancyZoom with jquery.fancyzoom
FancyZoom isn't a free-as-in-freedom software,
and is mostly a big pile of old-school javascript.
This commit replace it with a small jquery-powered
script under MIT license.
2019-05-28 00:56:46 +02:00
jvoisin 1090348b0e Use the version number in jquery-ui's css path 2019-05-20 22:57:21 +02:00
jvoisin 58daacd9ab Jetty is only used by developers, and never in production
So we're free to completely ignore CVE against it.
2019-05-16 00:37:37 +02:00
jvoisin 3ee6fefe11 Bump jQuery/jquery-ui to the latest versions
I bumped it first to 2.X with jQuery migrate, played around but didn't manage
to trigger any warning.  So I bumped it again to the latest available version,
jQuery 3.4.0, which isn't triggering useful warnings either.
2019-04-28 16:26:36 +02:00
jvoisin 925ecdaa03 Add a gitlab-ci file 2019-04-27 21:18:30 +02:00