Commit Graph

12409 Commits

Author SHA1 Message Date
e-dschungel f57689b284
adjust php.net URL
https://secure.php.net is redirected to https://www.php.net by now, see PR#2371
2024-01-13 10:49:36 +01:00
Andreas Gohr e33e723e8b
Merge pull request #4134 from dokuwiki/betterapi
Complete API Refactoring
2024-01-12 19:24:11 +01:00
Andreas Gohr 0f4cccae30
Merge pull request #4142 from dokuwiki/bot/deletedFiles
🤖 Update deleted files
2024-01-12 19:16:13 +01:00
splitbrain 84af670735 🤖 Update deleted files 2024-01-12 18:15:05 +00:00
Andreas Gohr 13e42cc98c
Merge pull request #4115 from dokuwiki/phpseclib3
Upgrade to phpseclib Version 3
2024-01-12 19:14:44 +01:00
Andreas Gohr 47e9ed0e2d adjust AES encryption to match phpseclib version2
See https://github.com/phpseclib/phpseclib/discussions/1974#discussioncomment-8107663
2024-01-12 19:05:45 +01:00
Andreas Gohr 06216d5e8b add (failing) compability test for AES encryption 2024-01-12 19:05:45 +01:00
Andreas Gohr 927933f55f upgrade to phpseclib 3
This replaces the dependabot PR #4114 and adjusts the usage of the
library.
2024-01-12 19:05:45 +01:00
Phy f2c2d7f24e
Merge pull request #4141 from dokuwiki-translate/lang_update_788_1705047315
Translation update (ru)
2024-01-12 09:32:12 -05:00
k04an fc53e55227 translation update 2024-01-12 09:16:52 +01:00
Andreas Gohr 079b7b26fa LegacyAPI: fix return types on missing pages 2024-01-11 10:09:01 +01:00
Andreas Gohr 4385690f2a fix error handling in XMLRPC
response errors in call() need to be returned as Error not as thrown
Exception.
2024-01-11 10:01:43 +01:00
Andreas Gohr 0ebd3bf191
Merge pull request #4138 from dokuwiki/issue4099
correctly escape comments in user names. fixes #4099
2024-01-10 12:29:10 +01:00
Andreas Gohr 15357ce4c4 API: fix media handling in legacy API 2024-01-10 11:07:27 +01:00
Andreas Gohr 462a56017f tune parallel tasks in rector
The default options for running paralell rector tasks changed in 0.19
resulting in failures on github runners.

See also https://github.com/rectorphp/rector/issues/8396
2024-01-10 10:50:00 +01:00
Andreas Gohr 05fd0e839b update rector 2024-01-10 09:07:44 +01:00
Andreas Gohr 69adbe59b6 happy new year 2024-01-09 17:58:31 +01:00
Andreas Gohr b5284271bc API: add backward compatibility to API Version 11
This adds legacy support for the old API calls. This is mostly untested
but should work. Returns might not be 100% compatible in all cases but I
did my best to return the same things as before.

This will be removed in the future of course and is just to not
completely break any API usage immeadiately.
2024-01-09 17:49:09 +01:00
Andreas Gohr 49fcb6afe4
Merge pull request #4139 from dokuwiki-translate/lang_update_785_1704816833
Translation update (pl)
2024-01-09 17:22:46 +01:00
Marek Adamski 30e2689b0b translation update 2024-01-09 17:16:53 +01:00
Andreas Gohr 7f6de1e37e fix japanese romanization. fixes #4047
Adjusted two entries after deduplication based on feedback by @ssahara
2024-01-09 15:00:13 +01:00
Andreas Gohr bdeec7bf53
Merge pull request #4136 from dokuwiki/issue4135
More resilence when talking to plugin repo fixes #4135
2024-01-09 14:34:33 +01:00
Andreas Gohr b346670ea2 correctly escape comments in user names. fixes #4099 2024-01-09 14:32:22 +01:00
Andreas Gohr 0a034b36c9 do not pass referrer on api retry. fixes #3824
Our cache system ignores purge requests that have a referrer. The idea
is to avoid permanent recaching because a purge link was posted
somewhere.
However for the retry link in the extension manager we actually want the
link to work. So this patch supresses the referrer for that link.
2024-01-08 16:00:32 +01:00
Andreas Gohr f11d30144b More resilence when talking to plugin repo fixes #4135
When the plugin repository answers but returns non-data (as can happen
when the database isn't available, as we have learned yesterday), the
extension manager still tried to deserialize the data.

This changes all communication from php-serialized to JSON encoded data.
When JSON-decoding fails, the data is ignored and an error message is
shown. Failure data like this will not be cached.
2024-01-08 15:54:34 +01:00
Andreas Gohr d48c2b252a API: code style fixes 2024-01-07 13:41:20 +01:00
Andreas Gohr ebae58f7ac compatibility fix in ClassResolver
T_NAME_QUALIFIED is only available in PHP8+, earlier it's simply a
T_STRING
2024-01-07 13:41:19 +01:00
Andreas Gohr 9866f25121 wild stab at fixing a failing test
RemoteApiTest::testCreateUserFailAccess failed on github but worked for
me. Seems to be a caching problem in auth_ismanager()
2024-01-07 13:41:19 +01:00
Andreas Gohr 5e47e6df3b API added simple JSONRPC tests 2024-01-07 13:41:19 +01:00
Andreas Gohr 12b9975326 fix XMLRPC server tests
We test against the MockAPICore now since the tests are meant to ensure
the general functionality of accepting XML and correctly calling
APICalls works, not that the API returns the right things (this is
tested in the ApiCore tests).
Since we no longer use dates but always integers, we no longer need to
handle that.
2024-01-07 13:41:19 +01:00
Andreas Gohr 801ecc14bc Fix Api Tests 2024-01-07 13:41:19 +01:00
Andreas Gohr 6e1ddc6494 fix ApiCoreAclCheckTest
This is mostly syntactic fix. I did not check how sensible these tests
are and did not switch from positional to named arguments
2024-01-07 13:41:19 +01:00
Andreas Gohr cad27e80a9 API: move user related tests to usermanager plugin 2024-01-07 13:41:19 +01:00
Andreas Gohr d1f06eb4f0 API: ApiCore tests fixed and extended 2024-01-07 13:41:19 +01:00
Andreas Gohr 7de5ac5588 Another argument parsing fix for ApiCall
When using named parameters, you can expect to be able to leave out any
optional parameter and have it take it's default, even when you specify
another "later" parameter. Luckily we already know all the defaults from
reflection anyway.
2024-01-07 13:41:19 +01:00
Andreas Gohr b209907b0d Clean up APICall tests
No need to retest all the docblock parsing when that is tested elsewhere
already.
2024-01-07 13:41:19 +01:00
Andreas Gohr 04acbb6fa7 API: fix named parameter handling in APICall
We cannot set missing paramerers to null. We need to make sure they are
not set at all.
2024-01-07 13:41:19 +01:00
Andreas Gohr 7625c9953d OpenAPI docs: fix error code deduplication 2024-01-07 13:41:19 +01:00
Andreas Gohr 8268b284d4 API: make responses sortable
All responses now need to implement __toString() so they can be easily
sorted or printed.
2024-01-07 13:41:19 +01:00
Andreas Gohr 9e6b19e662 API: fix listPages
Not all needed fields are returned by the search callback
2024-01-07 13:41:19 +01:00
Andreas Gohr 5bef72bebd API: getPageHistory is nicer than getPageVersions 2024-01-07 13:41:19 +01:00
Andreas Gohr 0eb4820cfa API: checkPage needs to consider revision 2024-01-07 13:41:19 +01:00
Andreas Gohr b115d6dbc1 API: always pass revision as integer 2024-01-07 13:41:19 +01:00
Andreas Gohr 7288c5bd99 API fix depth handling in listPages 2024-01-07 13:41:19 +01:00
Andreas Gohr 58ae4747de API: initialize responses explicitly
Instead of passing unknown arrays, explicit parameters are passed.
Revision handling should now work correctly since we can pass revision=0
but a mtime.
2024-01-07 13:41:19 +01:00
Andreas Gohr b433b69e7d API: remove file and date transformations
We always deal with timestamps or base64 now. Removing some of the magic
makes everything less complex.

Only affected plugin is confmanager, which needs an update.
2024-01-07 13:41:19 +01:00
Andreas Gohr d3856637cf API: clean up error codes
Error codes are now extracted from API core and printed on the OpenAPI
overview page. This makes it easier to see what is in use.

Error messages have been cleaned up, some new codes have been assigned.

Some errors have been removed. Eg. it is fine to iterate a media
namespace you don't have read access to. The result will either be empty
or contain files from lower namespaces that you *do* have access to.
2024-01-07 13:41:19 +01:00
Andreas Gohr 902647e630 API: Do not assume the start page for empty pageIDs 2024-01-07 13:41:19 +01:00
Andreas Gohr 0e8fe8122f ensure api explorer stays english
See https://github.com/Authress-Engineering/openapi-explorer/issues/207
2024-01-07 13:41:19 +01:00
Andreas Gohr e4e3d43949 moved OpenAPI generator to correct namespace
added missing doc blocks
2024-01-07 13:41:19 +01:00