Commit Graph

11098 Commits

Author SHA1 Message Date
Andreas Gohr 413313a155 Merge branch 'logging'
* logging:
  added JavaScript based filter mechanism
  added logging configuration
  replaced out calls to dbglog with new Logger calls
  added convenience methods to log to our default facilities
  added logviwer admin plugin
  added log dir to git
  central logging mechanism
2020-12-03 20:01:57 +01:00
Andreas Gohr b102b83e6d Merge branch 'globalErrorHandling'
* globalErrorHandling:
  fixed plugin name output on load error
  no need to convert Errors to Exceptions
  FatalException and proper plugin detection
  add shutdown handler to even manage fatal errors
  reflow overlong line
  better exception handling on plugin loading
  log stacktrace to error log
  guess which plugin was the source of an exception
  introduce a global error handler
2020-12-03 20:01:33 +01:00
Andreas Gohr e8baa3e847
Merge pull request #3307 from Rainbow-Spike/patch-3
Fixing of cell width
2020-12-03 19:58:23 +01:00
Andreas Gohr bae9e2a144
Merge pull request #3343 from splitbrain/bug3271
work around disabled php_strip_whitespace. fixes #3271
2020-12-03 19:57:44 +01:00
Henry Pan 1203daccf5
Merge pull request #3350 from dokuwiki-translate/lang_update_214_1606344717
Translation update (pt-br)
2020-11-25 18:53:51 -05:00
ANDRE BASSANI DE FREITAS a7d03b81e6 translation update 2020-11-25 23:56:40 +01:00
Andreas Gohr 5459b9fa38 Merge branch 'pr/3240'
* pr/3240:
  usermanager CLI: more cleanup
  usermanager CLI: use success messages
  usermanager CLI: fix parameter order for creating users
  usermanager CLI: catch plugin signalled error messages
  abort early when no auth backend is available
  type hints and cleanup
  typos
  remove unused variable
  add addToGroup and removeFromGroup
  initial usermanager cli
2020-11-25 22:18:36 +01:00
Andreas Gohr 3dc79ed872 usermanager CLI: more cleanup 2020-11-25 22:17:40 +01:00
Andreas Gohr 1a88e28379 usermanager CLI: use success messages
This makes it more consistent with the other tools
2020-11-25 22:17:01 +01:00
Andreas Gohr 4fe4fe89aa usermanager CLI: fix parameter order for creating users 2020-11-25 22:06:24 +01:00
Andreas Gohr 80fb44d96c usermanager CLI: catch plugin signalled error messages
Plugins may prevent user modifications and will use msg() to tell why.
This will catch the messages and print them on CLI as well
2020-11-25 22:02:09 +01:00
Andreas Gohr e56df87425 abort early when no auth backend is available 2020-11-25 22:01:42 +01:00
Andreas Gohr 44c2bd9127 type hints and cleanup 2020-11-25 21:49:23 +01:00
Andreas Gohr 59fb181961
Merge pull request #3342 from splitbrain/ghaction
Replace Appveyor and Travis with Github actions
2020-11-25 21:38:11 +01:00
Andreas Gohr 769d8ef12d
Merge pull request #3346 from splitbrain/userrevert
Allow revert action for logged in users only
2020-11-25 21:03:29 +01:00
Andreas Gohr f015cb7680
Merge pull request #3344 from splitbrain/smileys
SVG based smileys
2020-11-25 20:58:40 +01:00
Andreas Gohr 190782098e stricter user check in AbstractUserAction 2020-11-25 20:57:38 +01:00
Andreas Gohr c843d5563e
Merge pull request #3348 from ssahara/issue3339
set proper revinfo when media meta file is not available
2020-11-25 20:53:43 +01:00
Satoshi Sahara 5525369fbf set proper revinfo when media meta file is not available
MediaChangelog::getRevision() may return false when media changes meta file is missing, cause error unsupported operand types.
2020-11-22 16:51:30 +09:00
Andreas Gohr 7bbf38eeb4 avoid running tests twice for pull requests
This implements the suggested method from [1]. It runs tests on all pushes to
our own repository and for pull requests coming from other people's forks.

[1] https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/10
2020-11-20 23:52:08 +01:00
Andreas Gohr 2cf7c325f8 Replace Appveyor and Travis with Github actions
Travis has recently introduced built limits which makes using them very
slow sometimes and I never really liked the setup for appveyor for our
Windows testing.

This makes use of github actions instead. Some notes:

* since we only support PHP 7.2+ anymore, nothing below is tested
* MySQL and Postgres auth backends are only tested on Linux (as before)
* I am not actually sure the problem matchers are working as intended
* There is currently no good way to run tests that are allowed to fail
  so no PHP 8 tests are run yet
* I haven't reestablished the no-gzip test runs again, I'm not sure they
  are still relevant on modern PHP systems
* PHP 7.4 currently fails because of https://github.com/MarcusSchwarz/lesserphp/pull/18
* I'm currently using @v2 tags for the used action. We had a discussion
  before if we should actually pin the action to a fixed commit. For
  sake of easier maintainance, I would argue to trust the setup-php
  action.
2020-11-20 23:50:01 +01:00
Andreas Gohr 6b6d27d965 monkeypatch lesserphp
This applies https://github.com/MarcusSchwarz/lesserphp/pull/19 manually
to the vendor directory.

It seems lesserphp is abandoned and we will need to find a proper
solution. Probably by maintaining our own fork. For now this should fix
PHP 7.4 tests.
2020-11-20 23:45:16 +01:00
Andreas Gohr 601a1f6035 Allow revert action for logged in users only
This should prevent accidental reverts by bots on open wikis
2020-11-20 23:13:47 +01:00
Andreas Gohr b09504a9ba SVG based smileys
This patch replaces our old gif based smileys by SVG based ones from the
Twemoji project. This allows for scaling the emojis with the text
they're used in.
2020-11-20 00:46:01 +01:00
Andreas Gohr 0827d09669
Merge pull request #3340 from stapelberg/patch-1
mime.conf: add SVG image mime type
2020-11-19 21:47:27 +01:00
Andreas Gohr 0465ea44b5
Merge pull request #3310 from splitbrain/mediacsp
Restrictive Content-Security-Policy for media #1045
2020-11-19 21:13:46 +01:00
Andreas Gohr 571a8adbb8 work around disabled php_strip_whitespace. fixes #3271 2020-11-19 20:51:22 +01:00
Andreas Gohr 8b07fee4b3
Merge pull request #3251 from splitbrain/slika
use Slika for image resizing and cropping
2020-11-19 15:46:36 +01:00
Andreas Gohr e71d33ca86 scrutinizer fix 2020-11-19 15:34:02 +01:00
Andreas Gohr 01648efd47 Media CSP: omit script-src and add frame-ancestors
See comments for details:

https://github.com/splitbrain/dokuwiki/pull/3310#discussion_r506909727
https://github.com/splitbrain/dokuwiki/pull/3310#discussion_r506913304
2020-11-19 15:17:42 +01:00
Michael Stapelberg 13dfa018fb
mime.conf: add SVG image mime type
This allows uploading and serving SVG images.
2020-11-18 22:31:41 +01:00
Henry Pan 14716531c7
Merge pull request #3336 from dokuwiki-translate/lang_update_210_1605341746
Translation update (cs)
2020-11-14 09:56:11 -05:00
Petr Kajzar 079f521b03 translation update 2020-11-14 09:21:11 +01:00
Henry Pan f36f35af36
Merge pull request #3326 from dokuwiki-translate/lang_update_206_1604153936
Translation update (vi)
2020-10-31 11:01:44 -04:00
Thien Hau b22e7f793f translation update 2020-10-31 15:21:39 +01:00
Henry Pan f192f09d08
Merge pull request #3325 from dokuwiki-translate/lang_update_204_1604037489
Translation update (zh-tw)
2020-10-30 12:27:23 -04:00
GHSRobert Ciang 0c3086bb9d translation update 2020-10-30 07:01:05 +01:00
Gerrit Uitslag 5bc95f0124
Merge pull request #3324 from GJRobert/nan-l10n
Remove strings and files not yet translated
2020-10-28 11:47:26 +01:00
GHSRobert Ciang 65e83d3f06 Remove strings and files not yet translated 2020-10-28 11:45:50 +08:00
Gerrit Uitslag 4b0317a1ec
Merge pull request #3323 from GJRobert/nan-l10n
Initial batch of Minnan localization
2020-10-27 16:55:24 +01:00
GHSRobert Ciang 0b1a77853a Initial batch of Minnan localization 2020-10-27 22:39:35 +08:00
Henry Pan e8823401ff
Merge pull request #3317 from dokuwiki-translate/lang_update_200_1603549813
Translation update (zh-tw)
2020-10-24 10:39:11 -04:00
GHSRobert Ciang 45a8f80288 translation update 2020-10-24 16:36:03 +02:00
Henry Pan 538b0fe1f3
Merge pull request #3313 from dokuwiki-translate/lang_update_196_1602803609
Translation update (ckb)
2020-10-16 01:27:26 -04:00
qezwan fe23cd0436 translation update 2020-10-16 01:16:15 +02:00
Andreas Gohr 6071f0eef3 added JavaScript based filter mechanism 2020-10-15 12:19:55 +02:00
Andreas Gohr 126b50b9fb
Merge pull request #2303 from splitbrain/requireStyleValue
Mark inputs of styling plugin as required
2020-10-14 15:23:11 +02:00
Andreas Gohr 6cda96e3cf Restrictive Content-Security-Policy for media #1045
This adds a CSP header for all media delivered through our fetch.php
dispatcher. This should revent any scripts etc. to be executed when
scriptable media, like SVG is used.

Suggestions on finetuning the policy are welcome.

The policy is added to the MEDIA_SENDFILE event, so plugins can easily
influence it. The way it is passed as an array should make it easier to
modify from plugins as well.

I put the mechanism to send the header into it's own class in the HTTP
namespace. Additional methods from inc/httputils could be moved here
later. The method might also be interesting for #2198 and #1676.
2020-10-14 15:10:47 +02:00
Michael Große 626992ac3e fix: mark inputs of styling plugin as required
While this cannot ensure that the value is valid, it should prevent
accidental saving of an empty field, which crashes the less compiler.

Fixes #2246
2020-10-14 14:18:28 +02:00
Andreas Gohr a7e2efd2e2 replace deprecated function calls #3266 2020-10-13 15:29:48 +02:00