Commit graph

2197 commits

Author SHA1 Message Date
ArthurHoaro
bd11879018
Merge pull request #1645 from ArthurHoaro/feature/plugin-register-route
Plugin system: allow plugins to provide custom routes
2020-12-16 16:04:15 +01:00
ArthurHoaro
8f423eb11c
Merge pull request #1658 from dougbreaux/master
newer alpine (for newer PHP) and apk upgrade #1655
2020-12-16 16:02:14 +01:00
ArthurHoaro
b1d78519a8
Merge pull request #1652 from ArthurHoaro/fix/failing-mutex
Fix: soft fail if the mutex is not working
2020-12-16 16:01:32 +01:00
ArthurHoaro
3d5f05052f
Merge pull request #1661 from shaarli/dependabot/npm_and_yarn/ini-1.3.7 2020-12-16 16:00:35 +01:00
ArthurHoaro
51dea3b87e
Merge pull request #1660 from e2jk/patch-1
Upgrade alpine from 3.8 to 3.10 in armhf Dockerfile
2020-12-16 15:59:46 +01:00
ArthurHoaro
6a3a78d023 Fix: synchronous metadata retrieval is failing in strict mode
Metadata can now only be string or null.

Fixes #1653
2020-12-16 14:04:32 +01:00
dependabot[bot]
5b74c67461
Bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 03:39:18 +00:00
Doug Breaux
2a20e67f76 remove apk upgrade #1655 2020-12-06 22:02:34 -06:00
Emilien Klein
ee07df357b
Upgrade alpine from 3.8 to 3.10 in armhf Dockerfile
The Docker for armhf doesn't build anymore on Alpine 3.8, upgrading to 3.10.
Building works fine on a Rapsberry Pi 4 running Raspbian GNU/Linux 10 (buster)



This is the error with 3.8:
```
[2/4] Fetching packages...
error css-loader@4.3.0: The engine "node" is incompatible with this module. Expected version ">= 10.13.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command '/bin/sh -c apk --update --no-cache add yarn nodejs-current python2 build-base     && cd /shaarli     && yarn install     && yarn run build     && rm -rf node_modules' returned a non-zero code: 1
```


Not upgrading to 3.11, due to this error:
```
2/4] Fetching packages...
error browserslist@4.14.3: The engine "node" is incompatible with this module. Expected version "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7". Got "13.1.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The command '/bin/sh -c apk --update --no-cache add yarn nodejs-current python2 build-base     && cd /shaarli     && yarn install     && yarn run build     && rm -rf node_modules' returned a non-zero code: 1
```


Not upgrading to 3.12 either, due to this error:
```
ERROR: unsatisfiable constraints:
  py2-pip (missing):
    required by: world[py2-pip]
The command '/bin/sh -c apk --update --no-cache add py2-pip     && cd /usr/src/app/shaarli     && pip install --no-cache-dir mkdocs     && mkdocs build --clean' returned a non-zero code: 1
```
There's probably a way to have Python2 pip installed on 3.12, but I suppose other issues would arise (such as the one happening with 3.11), so only proposing to upgrade to 3.10 now. This would probably be looked at more in detail when merging the amd64 and arm/v7 Docker builds, see #1496.
2020-12-06 21:02:39 +01:00
Doug Breaux
495545f2f0 newer alpine (for newer PHP) and apk upgrade #1655 2020-12-04 16:12:39 -06:00
ArthurHoaro
8a6b7e96b7 Fix: soft fail if the mutex is not working
And display the error in server admin page

Fixes #1650
2020-11-24 13:39:35 +01:00
ArthurHoaro
e4b8330e45
Merge pull request #1648 from nodiscc/fix-ConfigureControllerTest
ConfigureControllerTest.php: update expected languages number to 6
2020-11-24 13:39:09 +01:00
ArthurHoaro
05c616f7a0 chmod -x russian translation file 2020-11-24 13:35:37 +01:00
nodiscc
70507b8603
ConfigureControllerTest.php: update expected languages number to 6
Following the addition of russian translations in #1642
Fixes https://github.com/shaarli/Shaarli/issues/1647
2020-11-22 11:06:14 +00:00
ArthurHoaro
51580efbff
Merge pull request #1642 from prog-it/master 2020-11-17 13:13:49 +01:00
ArthurHoaro
da950241f3
Merge pull request #1639 from ArthurHoaro/doc/fix-release
Doc: fix missing merge on Release page
2020-11-15 12:48:16 +01:00
ArthurHoaro
a6e9c08499 Plugin system: allow plugins to provide custom routes
- each route will be prefixed by `/plugin/<plugin_name>`
  - add a new template for plugins rendering
  - add a live example in the demo_plugin

Check out the "Plugin System" documentation for more detail.

Related to #143
2020-11-15 12:41:43 +01:00
ArthurHoaro
2883c6d0a7 Daily RSS - Remove relative description (today, yesterday)
It is not useful for the RSS feed, as every new entry will be 'yesterday', and it requires an update the next day.
2020-11-15 12:05:08 +01:00
prog-it
1595d0e2b3 Add russian language file 2020-11-15 06:16:55 +05:00
prog-it
150f2a0f24 Add russian language selection 2020-11-14 07:45:10 +05:00
ArthurHoaro
831e974ea5 Doc: fix missing merge on Release page 2020-11-12 13:16:20 +01:00
ArthurHoaro
6f9e0609f4 Update badge versions 2020-11-12 13:05:19 +01:00
ArthurHoaro
a6935feb22
Merge pull request #1638 from ArthurHoaro/changelog/v0.12.1
CHANGELOG v0.12.1
2020-11-12 13:00:45 +01:00
ArthurHoaro
5a09b5fffd CHANGELOG v0.12.1 2020-11-12 12:56:22 +01:00
ArthurHoaro
302662797c
Merge pull request #1635 from ArthurHoaro/feature/phpcs 2020-11-10 10:46:04 +01:00
ArthurHoaro
c94c32d1a3
Merge pull request #1637 from ArthurHoaro/fix/server-admin-update-check
Server admin: do not retrieve latest version without update_check
2020-11-10 10:45:50 +01:00
ArthurHoaro
39b75ea983
Merge pull request #1636 from ArthurHoaro/fix/vintage-async-metadata 2020-11-10 10:45:22 +01:00
ArthurHoaro
7e78237fc9
Merge pull request #1630 from ArthurHoaro/fix/apache-config
Reviewed Apache configuration
2020-11-10 10:45:05 +01:00
ArthurHoaro
325cc8adad
Merge pull request #1634 from ArthurHoaro/fix/docker-compose
Docker-compose: fix SSL certificate + add parameter for Docker tag
2020-11-10 10:44:50 +01:00
ArthurHoaro
8affa22431
Merge pull request #1628 from ArthurHoaro/fix/nginx-config
Reviewed nginx configuration
2020-11-10 10:44:29 +01:00
ArthurHoaro
80c8889bfe Server admin: do not retrieve latest version without update_check
If the setting 'updates.check_updates' is disabled, do not retrieve the latest version on server administration page.

Additionally, updated default values for

  - updates.check_updates from false to true
  - updates.check_updates_branch from stable to latest
2020-11-09 14:42:30 +01:00
ArthurHoaro
85c09fe379 Vintage theme: fix routes in daily page 2020-11-09 12:46:43 +01:00
ArthurHoaro
336f15e8ba Vintage theme: display global messages 2020-11-09 12:46:24 +01:00
ArthurHoaro
1e49a65a2a Vintage theme: support async metadata retrieval 2020-11-09 12:36:04 +01:00
ArthurHoaro
2f4df75304 Update Static Analysis documentation 2020-11-09 12:17:40 +01:00
ArthurHoaro
5c856a6923 Run PHPCS during Travis CI checks + disable xdebug 2020-11-09 10:56:49 +01:00
ArthurHoaro
b99e00f7cd Manually fix remaining PHPCS errors 2020-11-09 10:56:49 +01:00
ArthurHoaro
53054b2bf6 Apply PHP Code Beautifier on source code for linter automatic fixes 2020-11-09 10:56:24 +01:00
ArthurHoaro
b7c50a58de Docker-compose: fix SSL certificate + add parameter for Docker tag
Use envvar SHAARLI_VIRTUAL_HOST for Traefik's docker.domain parameter instead of localhost (I'm not sure if did work at some point).

Add an environment variable to choose which Docker tag to use instead of using master by default.

Fixes #1632
2020-11-09 10:36:13 +01:00
ArthurHoaro
e09bb93e18 Coding style: switch PHPCS to PSR12
Also temporarily ignore test code (one step at a time).

Reference: https://www.php-fig.org/psr/psr-12/

Related to #95
2020-11-08 14:09:15 +01:00
ArthurHoaro
d9d71b10c3
Merge pull request #1621 from ArthurHoaro/feature/tag-separators 2020-11-08 14:07:33 +01:00
ArthurHoaro
c51d65238b
Merge pull request #1629 from ArthurHoaro/fix/demo-vimeo
Replace vimeo link in demo bookmarks due to IP ban on the demo instance
2020-11-08 14:06:45 +01:00
ArthurHoaro
8d8fa898ab
Merge pull request #1631 from ArthurHoaro/fix/html-extract-quote-fix
Fix an issue truncating extracted metadata content
2020-11-08 14:06:38 +01:00
ArthurHoaro
00d3dd91ef Fix an issue truncating extracted metadata content
Previous regex forced the selection to stop at either the first single or double quote found, regardless of the opening quote. Using '\1', we're sure to wait for the proper quote before stopping the capture.
2020-11-08 13:54:39 +01:00
ArthurHoaro
8a9796014c Reviewed Apache configuration
(in documentation)

For security purpose, block access to any static file not matching the list of allowed extensions.
It allows us to remove the specific retriction on dotfiles, and fix Apache part of #1608.
2020-11-08 13:13:13 +01:00
ArthurHoaro
9952de2fe0 Replace vimeo link in demo bookmarks due to IP ban on the demo instance
Fixes #1148
2020-11-08 11:58:17 +01:00
ArthurHoaro
ce901a5828 Reviewed nginx configuration
Both in documentation and Docker image.

For security purpose, it no longer allow to access static files through
the main nginx *location*. Static files are served if their extension
matches the whitelist.

As a side effect, we no longer need specific restrictions, and
therefore it fixes the nginx part of #1608.
2020-11-07 14:27:49 +01:00
ArthurHoaro
8c5f6c786d
Merge pull request #1627 from ArthurHoaro/fix/unexpected-error
Display error details even with dev.debug set to false
2020-11-06 10:00:03 +01:00
ArthurHoaro
cfdd209440 Display error details even with dev.debug set to false
It makes more sense to display the error even if it's unexpected.
Only for logged in users.

Fixes #1606
2020-11-05 19:55:17 +01:00
ArthurHoaro
8a1ce1da15 ESLint 2020-11-05 19:14:17 +01:00