Dan Brown [Tue, 3 Dec 2024 13:47:45 +0000 (13:47 +0000)]
Search API: Updated handling of parent detail, added testing
Review of #5280.
- Removed additional non-needed loads which could ignore permissions.
- Updated new formatter method name to be more specific on use.
- Added test case to cover changes.
- Updated API examples to align parent id/info in info to be
representative.
Dan Brown [Sun, 1 Dec 2024 16:02:21 +0000 (16:02 +0000)]
Dev Docker: Fixed missing gd jpeg handling, forced migrations
Migrations run without force could fail startup in certain environment
conditions (when testing production env).
Also updated paths permission handling to update more needed locations.
Dan Brown [Fri, 29 Nov 2024 13:19:55 +0000 (13:19 +0000)]
Attachments: Fixed full range request handling
We were not responsing with a range request, where the requested range
was for the full extent of content. This changes things to always
provide a range request, even for the full range.
Change made since our existing logic could cause problems in chromium
browsers.
Elseif statement removed as its was likley redundant based upon other
existing checks.
This also changes responses for requested ranges beyond content, but I
think that's technically correct looking at the spec (416 are for when
there are no overlapping request/response ranges at all).
Dan Brown [Thu, 28 Nov 2024 16:30:59 +0000 (16:30 +0000)]
Includes: Workaround for PHP 8.3.14 bug
Changed DOMText creation to be done via document so its document
reference is correct to avoid a bug in PHP 8.3.14.
Ref: https://github.com/php/php-src/issues/16967
Wes Biggs [Tue, 26 Nov 2024 17:21:20 +0000 (11:21 -0600)]
Updates the OIDC userinfo endpoint request to allow for a `Content-Type` response header with optional parameters, like `application/json; charset=utf-8`. This was causing an issue when integrating with [node-oidc-provider](https://github.com/panva/node-oidc-provider).
Dan Brown [Mon, 25 Nov 2024 15:54:15 +0000 (15:54 +0000)]
ZIP Import & Exports: Addressed issues during testing
- Handled links to within-zip page images found in chapter/book
descriptions; Added test to cover.
- Fixed session showing unrelated success on failed import.
Tested import file-create undo on failure as part of this testing.
Dan Brown [Fri, 22 Nov 2024 21:36:42 +0000 (21:36 +0000)]
ZIP Imports: Updated import form to show loading indicator
And disable button after submit.
Added here because the import could take some time, so it's best to show
an indicator to the user to show that something is happening, and help
prevent duplicate submission or re-submit attempts.
Dan Brown [Mon, 18 Nov 2024 17:42:49 +0000 (17:42 +0000)]
ZIP Imports: Added image type validation/handling
Images were missing their extension after import since it was
(potentially) not part of the import data.
This adds validation via mime sniffing (to match normal image upload
checks) and also uses the same logic to sniff out a correct extension.
Added tests to cover.
Also fixed some existing tests around zip functionality.
Dan Brown [Thu, 14 Nov 2024 15:59:15 +0000 (15:59 +0000)]
ZIP Import: Finished base import process & error handling
Added file creation reverting and DB rollback on error.
Added error display on failed import.
Extracted likely shown import form/error text to translation files.
Dan Brown [Fri, 8 Nov 2024 11:35:18 +0000 (11:35 +0000)]
Testing: Improved reliability
- Added extra column/value check for page revision test for accuracy.
- Changed search sort test to use more reliable values.
- Change due to database seeding somtimes generating values that
proceeded the test value, expected to be first, in sort results.
Dan Brown [Mon, 7 Oct 2024 21:55:10 +0000 (22:55 +0100)]
JS: Converted/updated translation code to TS, fixed some comment counts
- Migrated translation service to TS, stripping a lot of now unused code
along the way.
- Added test to cover translation service.
- Fixed some comment count issues, where it was not showing correct
value. or updating, on comment create or delete.