Commit Graph
1388 Commits
Author SHA1 Message Date
dependabot-preview[bot]andGitHub eb90a6ed0c Bump mariadb-java-client from 2.1.2 to 2.5.4
Bumps [mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 2.1.2 to 2.5.4.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mariadb-corporation/mariadb-connector-j/compare/2.1.2...2.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-06 07:44:04 +00:00
jvoisin c6eed14db5 Catch Exceptions instead of only Throwables in JAudiotaggerParser
Since JAudioTagger isn't the rock-solidest software
in the world, we should catch as much things as possible
2020-02-02 18:26:17 +01:00
jvoisinandGitHub a13552b6f5 Clean up a bit the jaudiotagger wrapper
- ID3v24 are now fully supported by jaudiotagger,
  there is no need to have special code to handle
  them
- Inline a couple of one-line'n'useless methods
- Replace isImageAvailable with getArtwork
- Make some methods static
- Specialise some exceptions
2020-02-01 12:55:29 +00:00
Andrew DeMaria 03a607d659 Merge remote-tracking branch 'origin/pr/1468' 2020-01-27 21:05:44 -07:00
Andrew DeMaria 165701bcdc Merge remote-tracking branch 'origin/pr/1466' 2020-01-27 21:00:48 -07:00
Andrew DeMaria 81bb6af9d8 Merge remote-tracking branch 'origin/pr/1474' 2020-01-27 20:36:34 -07:00
jvoisin 58bbb3e029 Bump Apache cxf-core from 3.3.4 to 3.3.5
This fixes CVE-2019-17573
2020-01-18 09:46:23 +01:00
Randomnicodeandjvoisin a6a0327b97 Set limit in random track query itself instead of in connection to optimize query plan
This is a direct backport of
https://github.com/airsonic-advanced/airsonic-advanced/commit/f84644ae3df80fe4918844b62035b6bffeeed824
2020-01-12 21:20:49 +01:00
Andrew DeMaria 64fad6a4c5 Merge remote-tracking branch 'origin/pr/1465' 2020-01-11 16:11:54 -07:00
Andrew DeMaria eafb128138 Merge remote-tracking branch 'origin/pr/1464' 2020-01-11 16:11:23 -07:00
Andrew DeMaria 8af5541792 Merge remote-tracking branch 'origin/pr/1463' 2020-01-11 16:10:01 -07:00
Andrew DeMaria af9ad128dd Merge remote-tracking branch 'origin/pr/1456' 2020-01-11 16:08:18 -07:00
Andrew DeMaria e7ded45009 Merge remote-tracking branch 'origin/pr/1459' 2020-01-11 16:07:52 -07:00
jvoisin d4002ef6ce Fix two possible nullptr deref 2020-01-11 11:27:35 +01:00
jvoisin e4d58e434a Please checkstyle 2020-01-11 11:14:19 +01:00
jvoisin 43ab59807a Make a couple of inner classes static
This might marginally improve the memory consumption,
but the main goal here is to make the code separation
between inner and outer class explicit.
2020-01-11 11:11:20 +01:00
jvoisin 13c73cc2dc Remove use of raw types
Make use of parametrised types where possible,
to please the java compiler and to make it easier
to find potential issues.
2020-01-11 10:59:48 +01:00
jvoisin 4d52a9cc62 Minor simplification of UrlTag
- Remove yet an other custom implementation of Pair
- Make a method static
2020-01-11 10:27:43 +01:00
François-Xavier ThomasandGitHub dc5a3020d3 Merge pull request #1455 from jvoisin/fix_bold_submenu
Fix the boldness of the main submenu
2020-01-09 20:59:19 +01:00
François-Xavier Thomas 015c7c54be Avoid exceptions if Lucene index is not ready on first startup
If the library is large enough, Airsonic finishes loading the
application before the first (automatic) scan is completed. The
exception is then shown on the home page until the scan completes.

Fixes #1402
2020-01-09 20:56:18 +01:00
Andrew DeMaria 3a98471f74 Merge remote-tracking branch 'origin/pr/1460' 2020-01-08 20:53:35 -07:00
François-Xavier Thomas c900af9fa3 Avoid exceptions if database is not ready and fully migrated on first startup
In particular, this should fix an issue described in #884 (and
reproduced since), where Airsonic tries to access the database while
Liquibase has not finished running all the migrations.

    2020-01-07 23:00:26.697 ERROR --- o.a.p.service.PodcastService             : Failed to initialize PodcastService: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, url, title, description, image_url, status, error_message from podcast_channel]; nested exception is java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]

    org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, url, title, description, image_url, status, error_message from podcast_channel]; nested exception is java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]
            at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:230) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:654) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:688) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:720) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:730) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:780) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.airsonic.player.dao.AbstractDao.query(AbstractDao.java:93) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.dao.PodcastDao.getAllChannels(PodcastDao.java:73) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.dao.PodcastDao$$FastClassBySpringCGLIB$$9fcd2715.invoke(<generated>) ~[classes!/:10.6.0-SNAPSHOT]
            at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.airsonic.player.dao.PodcastDao$$EnhancerBySpringCGLIB$$b59c1dc5.getAllChannels(<generated>) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.service.PodcastService.getAllChannels(PodcastService.java:185) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.service.PodcastService.init(PodcastService.java:112) ~[classes!/:10.6.0-SNAPSHOT]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
            at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1622) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.airsonic.player.Application.main(Application.java:207) ~[classes!/:10.6.0-SNAPSHOT]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
            at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[airsonic.war:10.6.0-SNAPSHOT]
    Caused by: java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]
            at org.hsqldb.jdbc.Util.throwError(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1525) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            ... 61 common frames omitted
2020-01-07 23:11:40 +01:00
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 28dfa6a1c7 Bump jwt's version 2020-01-05 17:05:15 +01:00
jvoisin 2a7e3cb846 Fix the boldness of the main submenu
This should close #1424
2020-01-05 17:02:44 +01:00
Andrew DeMaria 27c174a4d6 Merge remote-tracking branch 'origin/pr/1452' 2020-01-04 11:23:47 -07:00
Andrew DeMaria e9f9aad207 Merge remote-tracking branch 'origin/pr/1454' 2020-01-04 11:01:45 -07:00
François-Xavier Thomas d5f10e4c4c Turn off Airsonic banner during tests 2020-01-03 23:59:46 +01:00
François-Xavier Thomas a4118c1cf5 Suppress CVE-2019-12418 2020-01-03 23:59:28 +01:00
François-Xavier Thomas fa1fbb49dc Suppress CVE-2019-17563 2020-01-03 23:48:52 +01:00
François-Xavier Thomas 5bd841afb7 Change avatar storage column to bytea for PostgreSQL
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by
default[1]. That column type is not supported[2] very well when using
the `valueBlobFile` attribute, which expects a `bytea` column instead.

This was confirmed on all PostgreSQL versions starting from 9.6.

The `validCheckSum` attribute does not need to be updated since it was
already for the previous (binary_type, varchar_type) combination in
an unrelated commit (78a99d5860).

Fixes #1213.

[1] https://liquibase.jira.com/browse/CORE-1863
[2] https://github.com/liquibase/liquibase/pull/605
2020-01-03 19:42:47 +01:00
François-Xavier ThomasandGitHub 70de4c8f25 Merge pull request #1123 from eharris/seekable-transcodes
Change back to allow transcodes to allow seeking
2019-12-27 15:19:12 +01:00
Evan Harris 72e758bd3f Fixed integration tests to accomodate transcoding stream padding
Renamed the transcoding stream tests to have more specific names.
2019-12-16 23:02:22 -06:00
Evan Harris 1e21967303 Fix checkstyle issues for merge 2019-12-16 22:04:02 -06:00
Evan Harris a6cdba4a44 Added a warning if stream output exceeds predicted size 2019-12-16 22:04:02 -06:00
Evan Harris 6cfbe0ff88 Moved expected content length calculation to TranscodingService 2019-12-16 22:04:01 -06:00
Evan Harris b28ffb0d1a Added isRangeAllowed() function for transcoded sources
This isn't a perfect solution, but it should help increase confidence
that the transcoder in use is likely to produce an approximately
correct-sized stream.
2019-12-16 22:04:01 -06:00
Evan Harris e691c80774 Change back to allow transcodes to allow seeking
This switches back to allowing range rather than chunked requests so that
seeking works in the web player, but does so by safer means than previous
solutions, by slightly over-estimating the transcoded size, then sending
dummy bytes to the client to fill any gap.  Fixes #1117.  Addresses #685.
2019-12-16 22:03:44 -06:00
Andrew DeMaria dfac91fec4 Merge remote-tracking branch 'origin/pr/1406' 2019-12-16 19:30:13 -07:00
Robert Sprunk d063688422 Move PrivateDevices to a separate section and add a comment
Signed-off-by: Robert Sprunk <git@sprunk.me>
2019-12-09 14:28:19 +01:00
Andrew DeMaria 2f75254010 Merge remote-tracking branch 'origin/pr/1433' 2019-12-08 13:50:48 -07:00
Andrew DeMaria ec426fc1ed Merge remote-tracking branch 'origin/pr/1434' 2019-12-08 12:51:00 -07:00
Evan Harris ac45a9b7dc Added checkstyles for brace placement 2019-12-06 03:19:49 -06:00
Evan Harris 510314a9d8 Added SingleSpaceSeparator checkstyle 2019-12-06 03:14:19 -06:00
Evan Harris f476fd7c33 Added checkstyle for trailing whitespace 2019-12-06 03:10:06 -06:00
François-Xavier Thomas d7c5e3ab60 Add 'add to play queue' actions to playlist pages (#1226) 2019-12-05 22:27:49 +01:00
François-Xavier ThomasandGitHub 2d30a37208 Merge pull request #1235 from tesshucom/improve-search-accuracy
Improve search accuracy
2019-12-03 21:17:42 +01:00
tesshucom dba8610ff7 Apply stopwords dedicated to music search
- Iterate index version.
2019-12-04 02:08:59 +09:00
tesshucom bb464f15a8 Apply boost values ​​to search queries 2019-12-04 01:13:26 +09:00
François-Xavier Thomas d4a26ed691 Merge remote-tracking branch 'prschopf/master' 2019-11-27 21:19:37 +01:00