Commit Graph

100 Commits

Author SHA1 Message Date
KodeStar 1c7ae3e335 Fix silent tile disappearance and ownership-reassignment bugs
Tiles could vanish without ever being deleted:

- Editing an item merged the editor's user_id into every save, so
  updating a visible item (e.g. a shared user_id=0 tile) silently
  reassigned ownership and hid it from everyone else. user_id is now
  set on create only, and excluded from update input in both Item and
  Tag controllers since it is mass-assignable.
- Deleting a user left their items orphaned with a dangling user_id,
  invisible to all users forever. The user's items are now hard-deleted
  with the account, and a data migration reassigns already-orphaned
  items to the admin user so previously "lost" tiles reappear.
- The Item global scope's ownership filter had an ungrouped orWhere,
  breaking operator precedence in any query that adds further clauses.

Includes regression coverage for ownership on create/update, user
deletion cleanup, and the orphan-recovery migration.
2026-07-09 10:52:29 +01:00
KodeStar f1eec81591 Fix appload() returning a coerced HTTP 200 instead of a 404
ItemController::appload() was declared ': ?string', so its two error
branches that 'return response()->json([...], 404)' had the JsonResponse
coerced through Response::__toString() into a raw HTTP message served as
an HTTP 200 body. Widen the return type to
'\Illuminate\Http\JsonResponse|string|null' so those branches emit
real 404 JSON responses. The method body is unchanged, so the happy path
still returns the same JSON string and the frontend contract is preserved.

Flip the endpoint characterization test to assert the corrected 404.
2026-07-08 20:33:26 +01:00
KodeStar f547ae42bb Return graceful output from get_stats instead of a 500
get_stats/{id} fataled when the item id was missing and 500'd whenever an
enhanced app's livestats() threw - a broken or updated remote app definition
(e.g. Komga) took the whole request down, and the frontend then stopped
refreshing that tile entirely.

getStats now returns valid JSON (200) with an inactive/empty payload when the
item is missing, has no class, references a stale class, or throws, logging
the failure for diagnosis. The successful path is unchanged and returns the
livestats output verbatim.

Resolves #1558
2026-07-08 15:21:39 +01:00
Fabien Ehrlich 6a776e30f8 fix: proxy options in ItemController
The correct context is http->proxy :

https://www.php.net/manual/en/context.http.php
2026-05-13 11:35:13 +02:00
Chris Hunt 517f51ba90 Update items with no password 2025-09-10 16:14:14 +01:00
KodeStar 825f67a4a4 Merge pull request #1480 from Nyuwb/patch-1
feat(icon-upload): proxy management
2025-09-10 15:15:48 +01:00
Chris Hunt fd926e983d Fix for some enhanced apps not working 2025-08-02 17:17:40 +01:00
Fabien Ehrlich dce37c1412 feat(icon-upload): proxy management 2025-07-31 16:54:44 +02:00
Chris Hunt 41aa255b88 Add missing variable 2025-07-22 15:57:29 +01:00
Chris Hunt a8e4ab448b Load in configs values if class has been lost 2025-07-22 15:50:51 +01:00
Chris Hunt 6075dcca2d Fix importing apps and logging in 2025-07-17 14:19:02 +01:00
Chris Hunt 69bc8cb34e Fixes to reduce the SSRF attack vector. 2025-07-13 19:06:33 +01:00
Chris Hunt 2df58472a1 Fix uploads and displaying of malicious SVG files 2025-07-13 17:00:23 +01:00
Chris Hunt 22f66d35e5 Throw error if image doesn't have an extension #1446 2025-07-11 16:19:34 +01:00
Shift c1c3888673 Apply code style 2025-07-10 18:53:44 +00:00
Tobias Kolzer 921631bdcd fixed some rebase conflicts 2025-05-05 11:49:18 +02:00
Tobias Kolzer c56ffe1d1e fixed some rebase conflicts 2025-05-05 11:49:18 +02:00
goodactive 184e19abbc chore: fix some typos in comments
Signed-off-by: goodactive <goodactive@qq.com>
2024-04-19 18:00:20 +08:00
Chris Hunt f3bc6ab618 Add tags to application list, and fix home dashboard tag 2024-02-19 10:58:19 +00:00
KodeStar 809a997631 Merge pull request #1291 from KodeStar/2.x
Fix upload paths
2024-02-18 20:27:26 +00:00
Chris Hunt fb7f9de127 Fix upload paths 2024-02-18 20:26:20 +00:00
Chris Hunt d276bf8b1d Add alternate tag types 2024-02-18 18:16:46 +00:00
Chris Hunt 8fa870e8eb Initial commit 2024-02-18 09:06:03 +00:00
Shift f3a5be79dc Remove redundant typing from DocBlocks 2024-02-16 21:13:14 +00:00
Shift 3487f52a6b Add type hints from DocBlocks 2024-02-16 21:13:14 +00:00
Shift 51b30e55cd Adopt short array syntax
Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
2024-02-16 20:33:26 +00:00
Attila Kerekes fbd050d4e4 fix: validate icons to be images (#1173) 2023-06-06 12:08:47 +02:00
Attila Kerekes 5d67f570a9 fix: validate icons to be images (#1167) 2023-06-05 18:27:30 +02:00
Attila Kerekes 52620bc331 chore: Add laravel ide helper 2022-12-01 09:17:54 +00:00
Attila Kerekes bb5a078f35 feat: Add export import 2022-11-29 17:32:46 +00:00
KodeStar aa49a5fb42 Fixes #371 Tagged items when pinning/unpinning (#1036) 2022-11-25 23:21:45 +00:00
Attila Jozsef Kerekes 7565bd4028 chore: Add php code sniffer and apply fixes 2022-11-25 23:05:58 +00:00
Attila Kerekes 82b209d4b5 fix: Test enhanced app with apikey 2022-11-25 16:11:39 +00:00
Attila Kerekes 8bad474808 feat: Inject password from db during testing when editing enhanced apps 2022-11-19 20:48:31 +01:00
Attila Kerekes 157b972ff5 feat: Trigger app update when new version is deployed 2022-11-18 17:35:55 +01:00
Attila Kerekes 54679ff9eb feat: Keep stored password when Enhanced App is updated 2022-11-17 21:13:10 +01:00
Attila Kerekes b390a719e9 refactor: apply auto fixes from idea 2022-11-14 14:48:38 +01:00
Attila Kerekes 7cf9d46eb3 fix: Don't write existing icons to disk 2022-11-14 00:08:09 +01:00
Attila Kerekes fe0109494e feat: support the listing of private apps 2022-10-28 13:21:25 +00:00
Attila Kerekes 6907695c5d feat: support the listing of private apps 2022-10-28 09:55:16 +00:00
tomyvi c5817c9b2e Disable SSL checks on API calls 2022-04-07 10:34:07 +02:00
Shift b1dc4d4a41 Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the adopted coding style by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] config to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started.

For more information on customizing the code style applied by Shift, [watch this short video][4].

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://github.com/squizlabs/PHP_CodeSniffer
[3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
[4]: https://laravelshift.com/videos/shift-code-style
2022-03-19 13:54:32 +00:00
Kode a868a6cac1 Fix for creating tags not setting home dashboard as default 2022-03-18 10:10:00 +00:00
Kode 10afffb71d Fix test button 2022-03-17 19:03:06 +00:00
KodeStar 18001fbdd0 Get app regardless of if it's enhanced (might be a search provider) 2022-03-17 12:56:51 +00:00
Kode becbe5ab96 More work on apps 2022-03-16 18:35:40 +00:00
KodeStar 1e2b807e05 Lots of work on apps 2022-03-16 15:49:44 +00:00
KodeStar 8499d100ff More work on apps 2022-03-15 18:19:01 +00:00
Kode 4c63b66dbf Initial start of replacing apps list to use github generated list 2022-03-14 15:56:36 +00:00
Kode 60e20c4023 fix route typo when restoring trash 2019-07-14 09:46:10 +01:00