Compare commits

...

169 Commits

Author SHA1 Message Date
KodeStar
6b9f61b0e6 Merge pull request #1477 from KodeStar/2.x
Escape search queries and add setting value on edit
2025-07-24 19:06:50 +01:00
Chris Hunt
d1a96dd752 Escape search queries and add setting value on edit 2025-07-24 19:05:16 +01:00
KodeStar
1ccc0da2a7 Merge pull request #1476 from KodeStar/2.x
Load in configs values if class has been lost
2025-07-22 15:59:00 +01: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
KodeStar
e42f78bd49 Merge pull request #1473 from KodeStar/2.x
Add misisng input type in the form builder
2025-07-21 10:12:27 +01:00
Chris Hunt
08b8ab6d4f Add misisng input type in the form builder 2025-07-21 10:10:13 +01:00
KodeStar
57e0a335b7 Merge pull request #1471 from KodeStar/2.x
Add cache table
2025-07-17 14:46:16 +01:00
Chris Hunt
0d90170385 Add cache table 2025-07-17 14:43:09 +01:00
KodeStar
abe08a7b04 Merge pull request #1470 from KodeStar/2.x
Fix importing apps and logging in
2025-07-17 14:23:09 +01:00
Chris Hunt
6075dcca2d Fix importing apps and logging in 2025-07-17 14:19:02 +01:00
KodeStar
4fa41d8114 Merge pull request #1469 from KodeStar/2.x
Add tests and fix user edit form
2025-07-15 17:10:49 +01:00
Chris Hunt
1e6b1f6de5 Add tests and fix user edit form 2025-07-15 17:04:47 +01:00
KodeStar
53fd6242db Merge pull request #1467 from KodeStar/2.x
Fixes to reduce the SSRF attack vector plus display image names
2025-07-14 11:15:13 +01:00
Chris Hunt
69bc8cb34e Fixes to reduce the SSRF attack vector. 2025-07-13 19:06:33 +01:00
KodeStar
0388ee939a Merge pull request #1466 from KodeStar/2.x
Fix uploads and displaying of malicious SVG files
2025-07-13 17:02:27 +01:00
Chris Hunt
2df58472a1 Fix uploads and displaying of malicious SVG files 2025-07-13 17:00:23 +01:00
KodeStar
abbc78ee8d Merge pull request #1464 from KodeStar/2.x
Update framework to laravel 11 and fix images with no extension causing error 500
2025-07-11 16:36:40 +01:00
Chris Hunt
d1801d1088 Update cache version 2025-07-11 16:33:05 +01:00
Chris Hunt
22f66d35e5 Throw error if image doesn't have an extension #1446 2025-07-11 16:19:34 +01:00
Chris Hunt
f197aeb013 Fix forms on enhanced apps 2025-07-11 16:18:13 +01:00
Chris Hunt
8fb6438254 Updates to vendors etc 2025-07-11 15:57:48 +01:00
KodeStar
d972cbcd0a Merge pull request #14 from KodeStar/shift-154026
Migrate to `spatie/laravel-html`
2025-07-10 20:20:26 +01:00
Shift
638d2fe4a4 Convert Form facade 2025-07-10 19:17:24 +00:00
Shift
e251f4f1bc Swap dependency 2025-07-10 19:17:23 +00:00
KodeStar
ecc54b6fbe Merge pull request #13 from KodeStar/shift-154023
Laravel 11.x Shift
2025-07-10 20:15:54 +01:00
Shift
f0ce9d633a Remove createApplication method 2025-07-10 18:54:07 +00:00
Shift
968a5823a1 Adopt Laravel type hints 2025-07-10 18:54:07 +00:00
Shift
53f28b5056 Adopt anonymous migrations 2025-07-10 18:54:05 +00:00
Shift
7bb0a7ceb4 Bump Composer dependencies 2025-07-10 18:54:04 +00:00
Shift
f5ddd93141 Re-register routes 2025-07-10 18:54:03 +00:00
Shift
8554861d0a Re-register service providers 2025-07-10 18:54:02 +00:00
Shift
9091d1d707 Consolidate service providers 2025-07-10 18:54:02 +00:00
Shift
42d29f0fdb Re-register HTTP middleware 2025-07-10 18:54:02 +00:00
Shift
474059eee8 Default new bootstrap/app.php 2025-07-10 18:54:01 +00:00
Shift
1fb6f75555 Set new ENV variables 2025-07-10 18:54:01 +00:00
Shift
48e16ebfc9 Streamline config files 2025-07-10 18:54:00 +00:00
Shift
7153a41e03 Shift core files 2025-07-10 18:53:55 +00:00
Shift
b9e75b9284 Remove default app files 2025-07-10 18:53:54 +00:00
Shift
b3cdc5779c Slim lang files 2025-07-10 18:53:48 +00:00
Shift
c1c3888673 Apply code style 2025-07-10 18:53:44 +00:00
KodeStar
11453e1018 Merge pull request #1453 from riv-gh/bugfix/userlist-wrap
fixing page "/userselect" if many users on this
2025-07-10 19:25:34 +01:00
KodeStar
749442ec6e Merge pull request #1454 from knom/2.x
Enable/Disable Items with authentification headers
2025-07-10 19:24:57 +01:00
knom
5950ca9076 renamed "controles" to "controls" 2025-05-05 11:49:42 +02:00
Tobias Kolzer
55d3766b39 added AUTH_ROLES_DELIMITER to example env file 2025-05-05 11:49:41 +02:00
Tobias Kolzer
c71479f266 fixed some typos 2025-05-05 11:49:41 +02:00
Tobias Kolzer
2e5d7453cf added ENV variable for the auth roles delimiter 2025-05-05 11:49:41 +02:00
Tobias Kolzer
3cbbf807ab corrected some spelling mistakes 2025-05-05 11:49:41 +02:00
Tobias Kolzer
65a6ad53bf small 2025-05-05 11:49:41 +02:00
Tobias Kolzer
dff3f90d00 Update readme.md 2025-05-05 11:49:41 +02:00
Tobias Kolzer
041ec4236b updated supportedapps 2025-05-05 11:49:41 +02:00
Tobias Kolzer
808c41acd6 disabled users, items, tags for non admin users and user and login forms for all users 2025-05-05 11:49:31 +02:00
Tobias Kolzer
c08b0bfe39 changed naming of property 2025-05-05 11:49:31 +02:00
Tobias Kolzer
f7de56b7a7 added missing variable to example env 2025-05-05 11:49:18 +02:00
Tobias Kolzer
921631bdcd fixed some rebase conflicts 2025-05-05 11:49:18 +02:00
Tobias Kolzer
d146fed320 hide switchuser when auth_role is used 2025-05-05 11:49:18 +02:00
Tobias Kolzer
c56ffe1d1e fixed some rebase conflicts 2025-05-05 11:49:18 +02:00
daenur
e9d561466b Add warp on userlist
fixing page "/userselect" if many users on this
2025-04-25 10:57:56 +03:00
KodeStar
b90b38eae9 Merge pull request #1392 from linuxserver/bugfix/allow_ico_images
Allow ico images
2024-11-05 11:23:43 +00:00
Chris Hunt
be59ac794e Allow ico images fixes #1357 2024-11-05 11:11:34 +00:00
KodeStar
f820c0b4f6 Merge pull request #1388 from dfernandezdaw/2.x
Update Spanish translations
2024-11-05 10:56:55 +00:00
KodeStar
2b43760dc8 Merge pull request #1391 from linuxserver/bugfix/two_dots
Fix 2 dots that are visible on light backgrounds
2024-11-05 10:50:21 +00:00
KodeStar
8f360f97ef Merge branch '2.x' into bugfix/two_dots 2024-11-05 10:44:15 +00:00
KodeStar
014f054862 Merge pull request #1390 from linuxserver/feature/search_from_url
Search from URL fixed #1369
2024-11-05 10:42:59 +00:00
Chris Hunt
5ccb87cd7f Fix 2 dots that are visible on light backgrounds #1383 2024-11-05 10:42:05 +00:00
Chris Hunt
8ba8f0c867 Prettier fix 2024-11-05 10:33:12 +00:00
Chris Hunt
c2a3368c7b Search from URL fixed #1369 2024-11-05 10:29:34 +00:00
KodeStar
395c775d4e Merge pull request #1387 from linuxserver/bugfix/search_category_tiles
Fix searching of tiles in category mode
2024-11-05 10:14:02 +00:00
KodeStar
1063d2cd09 Update app.php 2024-11-05 09:42:10 +00:00
David
18609fb3c2 Update Spanish translations 2024-11-04 21:18:04 +01:00
Chris Hunt
b880333856 Fixes #1386 2024-11-04 10:30:24 +00:00
KodeStar
026bcf9e43 Merge pull request #1384 from linuxserver/feature/throttle_websitelookup
Throttle websitelookup's to 10 per minute to limit port scan effectiveness
2024-11-04 10:05:52 +00:00
Chris Hunt
837f5c49fa Throttle websitelookup's to 10 per minute to limit port scan effictiveness 2024-11-04 09:54:10 +00:00
KodeStar
a4973869d4 Merge pull request #1372 from tremor021/2.x
Added Serbian translation
2024-11-04 09:38:23 +00:00
KodeStar
07ea22dd10 Merge pull request #1328 from goodactive/2.x
chore: fix some typos in comments
2024-11-04 09:25:06 +00:00
tremor021
6188b1d669 Added Serbian translation 2024-09-27 22:04:30 +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
KodeStar
f405cf2ddf Update validation.php
Fix missing comma in Japanese translation
2024-03-31 21:40:31 +01:00
KodeStar
c16a4847f7 Update version number 2024-02-19 11:08:45 +00:00
KodeStar
9d0209c9df Merge pull request #1293 from KodeStar/2.x
Fixes to tags and show tags on application list
2024-02-19 11:08:18 +00:00
Chris Hunt
599035b3f8 Fix empty title when creating 2024-02-19 11:06:42 +00:00
Chris Hunt
f3bc6ab618 Add tags to application list, and fix home dashboard tag 2024-02-19 10:58:19 +00:00
Chris Hunt
09e4bb8cad Fix required fields and default items and tags to pinned 2024-02-19 10:03:03 +00:00
Chris Hunt
4b8bf5156d Fix prettier complaints 2024-02-19 09:56:03 +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
KodeStar
002bae3fb3 Merge pull request #1290 from KodeStar/feature/add_columns
Add alternate tag types
2024-02-18 18:35:43 +00:00
Chris Hunt
b7c0fd29c6 Fix extra prettier complaints 2024-02-18 18:33:47 +00:00
Chris Hunt
70252b7a43 Fix prettier complaints 2024-02-18 18:26:34 +00:00
Chris Hunt
d276bf8b1d Add alternate tag types 2024-02-18 18:16:46 +00:00
Chris Hunt
a0726a43ad Updates 2024-02-18 09:06:37 +00:00
Chris Hunt
8fa870e8eb Initial commit 2024-02-18 09:06:03 +00:00
KodeStar
d184427016 Merge pull request #1289 from linuxserver/revert-1288-2.x
Revert "Replace Mix with Vite"
2024-02-17 21:03:02 +00:00
KodeStar
36d1d55934 Revert "Replace Mix with Vite" 2024-02-17 21:02:45 +00:00
KodeStar
3a509fca47 Merge pull request #1288 from KodeStar/2.x
Replace Mix with Vite
2024-02-17 20:00:19 +00:00
KodeStar
afc07ab9bc Update ci.yml 2024-02-17 19:59:33 +00:00
KodeStar
0de1e5bd25 Merge pull request #9 from KodeStar/shift-110402
Migrate from Laravel Mix to Vite
2024-02-17 19:57:42 +00:00
Chris Hunt
029def9d90 Update vite 2024-02-17 19:56:47 +00:00
Shift
c6c9ec1d89 Ignore build assets 2024-02-17 19:03:26 +00:00
Shift
0f19e3c5de Add .vue extension to Vue imports 2024-02-17 19:03:25 +00:00
Shift
f3a4ac3619 Rename ENV variables 2024-02-17 19:03:25 +00:00
Shift
baf7131f20 Use ES modules 2024-02-17 19:03:24 +00:00
Shift
4430b21740 Remove webpack.mix.js 2024-02-17 19:03:24 +00:00
Shift
3a3cea437b Configure Vite 2024-02-17 19:03:23 +00:00
Shift
aa5a6fce4c Update build scripts 2024-02-17 19:03:23 +00:00
Shift
8781dbc9f5 Add npm dependencies 2024-02-17 19:03:23 +00:00
KodeStar
23f3a9c343 Merge pull request #1283 from KodeStar/bugfix/unable_to_load_apps
Add missing classname
2024-02-17 17:06:44 +00:00
Chris Hunt
2899b7db61 Add missing 2024-02-17 17:05:06 +00:00
KodeStar
e9bfd9a878 Merge pull request #1280 from KodeStar/bugfix/unable_to_load_apps
Unable to load apps after update to Laravel 10
2024-02-17 16:44:33 +00:00
Chris Hunt
5825858abc Unable to load apps after update to laravel 10 2024-02-17 16:42:26 +00:00
KodeStar
379ba34fe1 Merge pull request #1278 from KodeStar/bugfix/fix_language_dropdown
Fix languages dropdown
2024-02-17 15:27:55 +00:00
Chris Hunt
a0e5111771 Fix languages 2024-02-17 15:13:43 +00:00
KodeStar
c69961b200 Merge pull request #1277 from KodeStar/2.x
Update php version in CI tests
2024-02-17 10:21:13 +00:00
KodeStar
39f23103e4 Update ci.yml 2024-02-17 10:19:12 +00:00
KodeStar
e7d581244c Update ci.yml 2024-02-17 10:14:55 +00:00
KodeStar
2fea82c21e Change to php 8.3 2024-02-17 10:08:50 +00:00
Chris Hunt
274894562c Update php version in CI tests 2024-02-17 10:04:01 +00:00
KodeStar
9fbb3457d1 Add Laravel 10 dependencies 2024-02-17 08:12:27 +00:00
KodeStar
70f212c502 Update readme.md 2024-02-16 21:44:27 +00:00
KodeStar
5e2c3a5f66 Merge pull request #1276 from KodeStar/2.x
Update Laravel from 8 to 10
2024-02-16 21:41:05 +00:00
Chris Hunt
ffb5b03704 Update version 2024-02-16 21:38:25 +00:00
Chris Hunt
d52ae0d3c3 Update dependencies 2024-02-16 21:36:54 +00:00
KodeStar
22d7a59e59 Merge pull request #8 from KodeStar/shift-110368
Laravel 10.x Shift
2024-02-16 21:30:12 +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
2cb837e4b5 Add type hints for Laravel 10 2024-02-16 21:13:13 +00:00
Shift
8725493fcf Rename password_resets table 2024-02-16 21:13:11 +00:00
Shift
e902b3a38a Bump Composer dependencies 2024-02-16 21:13:09 +00:00
Shift
854fb420c2 Default config files
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.
2024-02-16 21:13:09 +00:00
Shift
5b4e14d886 Shift config files 2024-02-16 21:13:09 +00:00
Shift
ef25ec4f69 Shift core files 2024-02-16 21:13:07 +00:00
Shift
b943674881 Remove explicit call to register policies 2024-02-16 21:12:58 +00:00
Shift
3188a8f311 Convert string references to ::class
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
2024-02-16 21:12:53 +00:00
KodeStar
095aff86c2 Merge pull request #7 from KodeStar/shift-110367
Laravel 9.x Shift
2024-02-16 21:11:51 +00:00
Shift
018996526c Shift cleanup 2024-02-16 20:33:47 +00:00
Shift
1c73cf08de Adopt anonymous migrations 2024-02-16 20:33:46 +00:00
Shift
4bfcd643e6 Use <env> tags for configuration
`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.

Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/
2024-02-16 20:33:44 +00:00
Shift
04b8ede8db Bump Composer dependencies 2024-02-16 20:33:43 +00:00
Shift
a6ae60270f Default config files
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.
2024-02-16 20:33:43 +00:00
Shift
ee3361d9c9 Shift config files 2024-02-16 20:33:43 +00:00
Shift
42b5a294d0 Adopt class based routes 2024-02-16 20:33:38 +00:00
Shift
14b89ac44d Convert route options to fluent methods
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
2024-02-16 20:33:37 +00:00
Shift
ad86e54f37 Remove unnecessary $model property 2024-02-16 20:33:37 +00:00
Shift
0f4b336d82 Remove web.config 2024-02-16 20:33:37 +00:00
Shift
6423ccd075 Shift core files 2024-02-16 20:33:36 +00:00
Shift
72cd16afa1 Upgrade to Flysystem 3.0 2024-02-16 20:33:33 +00:00
Shift
d41c4c8d4c Replace deprecated HEADER_X_FORWARDED_ALL constant 2024-02-16 20:33:33 +00:00
Shift
2b602ce66d Streamline $commands property 2024-02-16 20:33:32 +00:00
Shift
aa72ce0a3f Shift registered middleware 2024-02-16 20:33:32 +00:00
Shift
825ff6a6c8 Move resources/lang folder 2024-02-16 20:33:30 +00:00
Shift
be93195188 Convert string references to ::class
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
2024-02-16 20:33:27 +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
KodeStar
ecb668a8f3 Merge pull request #1155 from TheDen/add-search-application-item
add search via select2 for application dropdown
2024-02-12 19:44:23 +00:00
KodeStar
2e96b7bd09 Update app.php version 2023-11-11 15:04:44 +00:00
KodeStar
768e7a6576 Merge pull request #1222 from fyutins/2.x
Fix and add SVG support
2023-11-11 14:58:41 +00:00
Fyutins
431eafb2b6 Fix and add SVG support 2023-09-26 18:51:12 +02:00
Ian Jones
d2184eef0a Update readme.md (#1186)
Spelling and Grammar, included a few apostrophes for correct plural form or possessive. 

Added Capitalization to proper nouns

Included a single colon for consistency to match the styling of  it's predecessor paragraph
2023-08-09 11:21:57 +02: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
7d016cdaa6 fix: Remove mix from trianglify.js (#1166) 2023-05-26 13:36:07 +02:00
ullbergm
6e954a355d Add Trianglify (#1158) 2023-05-26 10:23:06 +02:00
KodeStar
60faccad27 Remove register route (#1163) 2023-05-20 21:56:34 +02:00
jatdung
1f5493ac98 fix sortable tooltip (#1130) 2023-05-16 16:42:17 +02:00
TheDen
427353bdfc add search via select2 for application dropdown 2023-04-29 18:25:02 +10:00
aptalca
9c117b7946 Merge pull request #1150 from linuxserver/2.x-project
handle issue-pr close and review submitted actions
2023-04-19 09:22:36 -04:00
aptalca
c72fee9644 handle issue-pr close and review submitted actions 2023-04-14 15:31:46 -04:00
aptalca
0999bebcb4 Merge pull request #1147 from linuxserver/2.x-issues
add issue-pr workflows
2023-04-08 19:00:40 -04:00
aptalca
1c41e3d1ef add issue-pr workflows 2023-04-06 15:25:53 -04:00
Chris Hunt
ed3cd79c92 Change minor version ready for next release 2023-03-09 16:17:32 +00:00
13539 changed files with 693656 additions and 453419 deletions

View File

@@ -4,7 +4,15 @@ APP_KEY=
APP_DEBUG=false
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12
LOG_CHANNEL=daily
LOG_STACK=single
DB_CONNECTION=sqlite
DB_DATABASE=app.sqlite
@@ -16,11 +24,14 @@ DB_DATABASE=app.sqlite
#DB_USERNAME=<user>
#DB_PASSWORD=<password>
BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
@@ -48,3 +59,11 @@ PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
AUTH_ROLES_ENABLE=false
AUTH_ROLES_HEADER="remote-groups"
AUTH_ROLES_HTTP_HEADER="HTTP_REMOTE_GROUPS"
AUTH_ROLES_ADMIN="admin"
AUTH_ROLES_DELIMITER=","
ALLOW_INTERNAL_REQUESTS=false

View File

@@ -0,0 +1,16 @@
name: Issue & PR Tracker
on:
issues:
types: [opened,reopened,labeled,unlabeled,closed]
pull_request_target:
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
pull_request_review:
types: [submitted,edited,dismissed]
jobs:
manage-project:
permissions:
issues: write
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
secrets: inherit

13
.github/workflows/call_issues_cron.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '35 15 * * *'
workflow_dispatch:
jobs:
stale:
permissions:
issues: write
pull-requests: write
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
secrets: inherit

View File

@@ -12,19 +12,19 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '7.4'
php-version: '8.3'
extensions: mbstring, dom, fileinfo, mysql, libxml, xml, xmlwriter, dom, tokenizer, filter, json, phar, pcre, openssl, pdo, intl, curl
- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Run composer install
run: composer install -n --prefer-dist
env:
APP_ENV: testing
#- name: Run composer install
# run: composer install -n --prefer-dist
# env:
# APP_ENV: testing
- name: Prepare Laravel Application
run: |
@@ -32,7 +32,7 @@ jobs:
php artisan key:generate
- name: Cache yarn dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: node_modules
key: yarn-${{ hashFiles('yarn.lock') }}
@@ -49,11 +49,11 @@ jobs:
APP_ENV: testing
- name: Php code sniffer
run: ./vendor/bin/phpcs
run: ./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
- name: Upload artifacts
uses: actions/upload-artifact@master
if: failure()
with:
name: Logs
path: ./storage/logs
path: ./storage/logs

File diff suppressed because it is too large Load Diff

15
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
}
}
]
}

16
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Docker Compose",
"type": "shell",
"command": "docker-compose up --build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -66,17 +66,11 @@ class Application extends Model
return $this->icon;
}
/**
* @return string
*/
public function iconView(): string
{
return asset('storage/'.$this->icon);
}
/**
* @return string
*/
public function defaultColour(): string
{
// check if light or dark
@@ -87,33 +81,26 @@ class Application extends Model
return '#161b1f';
}
/**
* @return string
*/
public function class(): string
{
$name = $this->name;
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
return '\App\SupportedApps\\'.$name.'\\'.$name;
return \App\SupportedApps::class.'\\'.$name.'\\'.$name;
}
/**
* @param $name
* @return string
*/
public static function classFromName($name): string
{
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
$class = '\App\SupportedApps\\'.$name.'\\'.$name;
$class = \App\SupportedApps::class.'\\'.$name.'\\'.$name;
return $class;
}
/**
* @return Collection
*/
public static function apps(): Collection
{
$json = json_decode(file_get_contents(storage_path('app/supportedapps.json'))) ?? [];
@@ -122,9 +109,6 @@ class Application extends Model
return $apps->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE);
}
/**
* @return array
*/
public static function autocomplete(): array
{
$apps = self::apps();
@@ -188,14 +172,11 @@ class Application extends Model
return null;
}
$classname = preg_replace('/[^\p{L}\p{N}]/u', '', $app->name);
$app->class = '\App\SupportedApps\\'.$classname.'\\'.$classname;
$app->class = \App\SupportedApps::class.'\\'.$classname.'\\'.$classname;
return $app;
}
/**
* @return array
*/
public static function applist(): array
{
$list = [];

View File

@@ -35,10 +35,8 @@ class RegisterApp extends Command
/**
* Execute the console command.
*
* @return void
*/
public function handle()
public function handle(): void
{
$folder = $this->argument('folder');
if ($folder == 'all') {
@@ -56,10 +54,8 @@ class RegisterApp extends Command
/**
* @param $folder
* @param bool $remove
* @return void
*/
public function addApp($folder, bool $remove = false)
public function addApp($folder, bool $remove = false): void
{
$json = app_path('SupportedApps/'.$folder.'/app.json');
@@ -96,9 +92,8 @@ class RegisterApp extends Command
/**
* @param $appFolder
* @param $icon
* @return void
*/
private function saveIcon($appFolder, $icon)
private function saveIcon($appFolder, $icon): void
{
$iconPath = app_path('SupportedApps/' . $appFolder . '/' . $icon);
$contents = file_get_contents($iconPath);

View File

@@ -1,42 +0,0 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

View File

@@ -1,41 +0,0 @@
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
{
$this->reportable(function (Throwable $e) {
//
});
}
}

13
app/Facades/Form.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
class Form extends Facade
{
protected static function getFacadeAccessor()
{
return 'custom-form';
}
}

View File

@@ -1,6 +1,7 @@
<?php
use Illuminate\Support\Str;
use enshrined\svgSanitize\Sanitizer;
/**
* @param $bytes
@@ -14,15 +15,15 @@ function format_bytes($bytes, bool $is_drive_size = true, string $beforeunit = '
$btype = ($is_drive_size === true) ? 1000 : 1024;
$labels = ['B', 'KB', 'MB', 'GB', 'TB'];
// use 1000 rather than 1024 to simulate HD size not real size
for ($x = 0; $bytes >= $btype && $x < (count($labels) - 1); $bytes /= $btype, $x++);
for ($x = 0; $bytes >= $btype && $x < (count($labels) - 1); $bytes /= $btype, $x++) ;
if ($labels[$x] == 'TB') {
return round($bytes, 3).$beforeunit.$labels[$x].$afterunit;
return round($bytes, 3) . $beforeunit . $labels[$x] . $afterunit;
} elseif ($labels[$x] == 'GB') {
return round($bytes, 2).$beforeunit.$labels[$x].$afterunit;
return round($bytes, 2) . $beforeunit . $labels[$x] . $afterunit;
} elseif ($labels[$x] == 'MB') {
return round($bytes, 2).$beforeunit.$labels[$x].$afterunit;
return round($bytes, 2) . $beforeunit . $labels[$x] . $afterunit;
} else {
return round($bytes, 0).$beforeunit.$labels[$x].$afterunit;
return round($bytes, 0) . $beforeunit . $labels[$x] . $afterunit;
}
}
@@ -37,11 +38,11 @@ function str_slug($title, string $separator = '-', string $language = 'en'): str
return Str::slug($title, $separator, $language);
}
if (! function_exists('str_is')) {
if (!function_exists('str_is')) {
/**
* Determine if a given string matches a given pattern.
*
* @param string|array $pattern
* @param string|array $pattern
* @param string $value
* @return bool
*
@@ -64,7 +65,7 @@ function get_brightness($hex)
// $hex = str_replace('#', '', $hex);
$hex = preg_replace("/[^0-9A-Fa-f]/", '', $hex);
if (strlen($hex) == 3) {
$hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2];
$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
}
$c_r = hexdec(substr($hex, 0, 2));
@@ -97,7 +98,7 @@ function getLinkTargetAttribute(): string
if ($target === 'current') {
return '';
} else {
return ' target="'.$target.'"';
return ' target="' . $target . '"';
}
}
@@ -109,3 +110,34 @@ function className($name)
{
return preg_replace('/[^\p{L}\p{N}]/u', '', $name);
}
/**
* @param string $file
* @param string $extension
* @return bool
*/
function isImage(string $file, string $extension): bool
{
$allowedExtensions = ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'svg', 'webp', 'ico'];
if (!in_array($extension, $allowedExtensions)) {
return false;
}
$tempFileName = @tempnam("/tmp", "image-check-");
$handle = fopen($tempFileName, "w");
fwrite($handle, $file);
fclose($handle);
if ($extension === 'svg') {
$sanitizer = new Sanitizer();
$sanitizedSvg = $sanitizer->sanitize(file_get_contents($tempFileName));
file_put_contents($tempFileName, $sanitizedSvg);
return 'image/svg+xml' === mime_content_type($tempFileName);
}
$size = @getimagesize($tempFileName);
return is_array($size) && str_starts_with($size['mime'], 'image');
}

View File

@@ -49,9 +49,6 @@ class LoginController extends Controller
$this->middleware('guest')->except(['logout','autologin']);
}
/**
* @return string
*/
public function username(): string
{
return 'username';
@@ -60,8 +57,6 @@ class LoginController extends Controller
/**
* Handle a login request to the application.
*
* @param Request $request
* @return Response
*
* @throws ValidationException
*/
@@ -97,10 +92,6 @@ class LoginController extends Controller
{
}
/**
* @param User $user
* @return RedirectResponse
*/
public function setUser(User $user): RedirectResponse
{
Auth::logout();
@@ -111,7 +102,6 @@ class LoginController extends Controller
/**
* @param $uuid
* @return RedirectResponse
*/
public function autologin($uuid): RedirectResponse
{
@@ -135,15 +125,13 @@ class LoginController extends Controller
*
* @return Application|Factory|View
*/
public function showLoginForm()
public function showLoginForm(): \Illuminate\View\View
{
return view('auth.login');
}
/**
* @param Request $request
* @param $user
* @return RedirectResponse
*/
protected function authenticated(Request $request, $user): RedirectResponse
{

View File

@@ -41,9 +41,6 @@ class RegisterController extends Controller
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data): \Illuminate\Contracts\Validation\Validator
{
@@ -56,11 +53,8 @@ class RegisterController extends Controller
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
protected function create(array $data): User
{
return User::create([
'name' => $data['name'],

View File

@@ -4,13 +4,12 @@ namespace App\Http\Controllers;
use App\User;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
use AuthorizesRequests, ValidatesRequests;
protected $user;

View File

@@ -12,17 +12,11 @@ use Illuminate\Support\Facades\RateLimiter;
class HealthController extends Controller
{
/**
* @return int
*/
private static function getUsers(): int
{
return User::count();
}
/**
* @return int
*/
private static function getItems(): int
{
return Item::select('id')
@@ -34,7 +28,6 @@ class HealthController extends Controller
/**
* Handle the incoming request.
*
* @param Request $request
* @return JsonResponse|Response
* @throws BindingResolutionException
*/

View File

@@ -19,8 +19,6 @@ class HomeController extends Controller
/**
* Show the application dashboard.
*
* @return RedirectResponse
*/
public function index(): RedirectResponse
{

View File

@@ -20,9 +20,6 @@ class ImportController extends Controller
/**
* Handle the incoming request.
*
* @param Request $request
* @return View
*/
public function __invoke(Request $request): View
{

View File

@@ -18,8 +18,11 @@ use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\URL;
use Illuminate\Validation\ValidationException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
use Illuminate\Http\Response;
use enshrined\svgSanitize\Sanitizer;
class ItemController extends Controller
{
@@ -31,21 +34,60 @@ class ItemController extends Controller
/**
* Display a listing of the resource on the dashboard.
*
* @return View
*/
public function dash(): View
public function dash(Request $request): View
{
$data['apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orWhere('type', 1)->pinned()->orderBy('order', 'asc')->get();
$treat_tags_as = \App\Setting::fetch('treat_tags_as');
$data['all_apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orWhere('type', 1)->orderBy('order', 'asc')->get();
$data["treat_tags_as"] = $treat_tags_as;
if (config('app.auth_roles_enable')) {
$roles = explode(config('app.auth_roles_delimiter'), $request->header(config('app.auth_roles_header')));
if ($treat_tags_as == 'categories') {
$data['categories'] = Item::whereHas('children')->with('children', function ($query) {
$query->pinned()->orderBy('order', 'asc');
})->pinned()->orderBy('order', 'asc')->get();
} elseif ($treat_tags_as == 'tags') {
$data['apps'] = Item::with('parents')->where('type', 0)->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::where('type', 0)->orderBy('order', 'asc')->get();
$data['taglist'] = Item::where('id', 0)->orWhere(function ($query) {
$query->where('type', 1)->pinned();
})->orderBy('order', 'asc')->get();
} else {
$data['apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->whereIn('role', $roles)->orWhere('type', 1)->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orWhere('type', 1)->orderBy('order', 'asc')->get();
}
} else {
if ($treat_tags_as == 'categories') {
$data['categories'] = Item::whereHas('children')->with('children', function ($query) {
$query->pinned()->orderBy('order', 'asc');
})->pinned()->orderBy('order', 'asc')->get();
} elseif ($treat_tags_as == 'tags') {
$data['apps'] = Item::with('parents')->where('type', 0)->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::where('type', 0)->orderBy('order', 'asc')->get();
$data['taglist'] = Item::where('id', 0)->orWhere(function ($query) {
$query->where('type', 1)->pinned();
})->orderBy('order', 'asc')->get();
} else {
$data['apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orWhere('type', 1)->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orWhere(function ($query) {
$query->where('type', 1)->whereNot('id', 0);
})->orderBy('order', 'asc')->get();
}
}
//$data['all_apps'] = Item::doesntHave('parents')->get();
//die(print_r($data['apps']));
// die(print_r($data));
return view('welcome', $data);
}
@@ -68,7 +110,6 @@ class ItemController extends Controller
* Pin item on the dashboard.
*
* @param $id
* @return RedirectResponse
*/
public function pin($id): RedirectResponse
{
@@ -84,7 +125,6 @@ class ItemController extends Controller
* Unpin item on the dashboard.
*
* @param $id
* @return RedirectResponse
*/
public function unpin($id): RedirectResponse
{
@@ -134,13 +174,10 @@ class ItemController extends Controller
/**
* Display a listing of the resource.
*
* @param Request $request
* @return View
*/
public function index(Request $request): View
{
$trash = (bool) $request->input('trash');
$trash = (bool)$request->input('trash');
$data['apps'] = Item::ofType('item')->orderBy('title', 'asc')->get();
$data['trash'] = Item::ofType('item')->onlyTrashed()->get();
@@ -153,12 +190,11 @@ class ItemController extends Controller
/**
* Show the form for creating a new resource.
*
* @return View
*/
public function create(): View
{
//
$data['item'] = new \App\Item();
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = '0';
@@ -168,15 +204,12 @@ class ItemController extends Controller
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return View
*/
public function edit(int $id): View
{
// Get the item
$item = Item::find($id);
if ($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
if ($item->appid === null && $item->class !== null) { // old apps won't have an app id so set it
$app = Application::where('class', $item->class)->first();
if ($app) {
$item->appid = $app->appid;
@@ -193,9 +226,8 @@ class ItemController extends Controller
}
/**
* @param Request $request
* @param null $id
* @return Item
* @throws ValidationException
*/
public static function storelogic(Request $request, $id = null): Item
{
@@ -203,31 +235,62 @@ class ItemController extends Controller
$validatedData = $request->validate([
'title' => 'required|max:255',
'url' => 'required',
'file' => 'image'
]);
if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$image = $request->file('file');
$extension = $image->getClientOriginalExtension();
if ($extension === 'svg') {
$sanitizer = new Sanitizer();
$sanitizedSvg = $sanitizer->sanitize(file_get_contents($image->getRealPath()));
// Verify that the sanitization removed malicious content
if (strpos($sanitizedSvg, '<script>') !== false) {
throw ValidationException::withMessages(['file' => 'SVG contains malicious content and cannot be uploaded.']);
}
// Save the sanitized SVG back to the file
file_put_contents($image->getRealPath(), $sanitizedSvg);
}
$path = $image->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
} elseif (strpos($request->input('icon'), 'http') === 0) {
$options = array(
"ssl" => array(
$options = [
"ssl" => [
"verify_peer" => false,
"verify_peer_name" => false,
),
);
],
];
$file = $request->input('icon');
$path_parts = pathinfo($file);
if (!isset($path_parts['extension'])) {
throw ValidationException::withMessages(['file' => 'Icon URL must have a valid file extension.']);
}
$extension = $path_parts['extension'];
$contents = file_get_contents($request->input('icon'), false, stream_context_create($options));
if ($application) {
$icon = $application->icon;
} else {
$file = $request->input('icon');
$path_parts = pathinfo($file);
$icon = md5($contents);
$icon .= '.' . $path_parts['extension'];
if ($extension === 'svg') {
$sanitizer = new Sanitizer();
$contents = $sanitizer->sanitize($contents);
// Verify that the sanitization removed malicious content
if (strpos($contents, '<script>') !== false) {
throw ValidationException::withMessages(['file' => 'SVG contains malicious content and cannot be uploaded.']);
}
}
$path = 'icons/' . $icon;
if (!isImage($contents, $extension)) {
throw ValidationException::withMessages(['file' => 'Icon must be an image.']);
}
$path = 'icons/' . ($application ? $application->icon : md5($contents) . '.' . $extension);
// Private apps could have here duplicated icons folder
if (strpos($path, 'icons/icons/') !== false) {
@@ -260,7 +323,7 @@ class ItemController extends Controller
'user_id' => $current_user->getId(),
]);
if ($request->input('appid') === 'null') {
if ($request->input('appid') === 'null' || $request->input('appid') === null) {
$request->merge([
'class' => null,
]);
@@ -283,9 +346,6 @@ class ItemController extends Controller
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/
public function store(Request $request): RedirectResponse
{
@@ -299,9 +359,6 @@ class ItemController extends Controller
/**
* Display the specified resource.
*
* @param int $id
* @return void
*/
public function show(int $id): void
{
@@ -310,10 +367,6 @@ class ItemController extends Controller
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/
public function update(Request $request, int $id): RedirectResponse
{
@@ -326,15 +379,11 @@ class ItemController extends Controller
/**
* Remove the specified resource from storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/
public function destroy(Request $request, int $id): RedirectResponse
{
//
$force = (bool) $request->input('force');
$force = (bool)$request->input('force');
if ($force) {
Item::withTrashed()
->where('id', $id)
@@ -351,9 +400,6 @@ class ItemController extends Controller
/**
* Restore the specified resource from soft deletion.
*
* @param int $id
* @return RedirectResponse
*/
public function restore(int $id): RedirectResponse
{
@@ -371,14 +417,13 @@ class ItemController extends Controller
/**
* Return details for supported apps
*
* @param Request $request
* @return string|null
* @throws GuzzleException
*/
public function appload(Request $request): ?string
{
$output = [];
$appid = $request->input('app');
$itemId = $request->input('item_id');
if ($appid === 'null') {
return null;
@@ -388,13 +433,15 @@ class ItemController extends Controller
$output['custom'] = null;
$app = Application::single($appid);
$output = (array) $app;
$output = (array)$app;
$appdetails = Application::getApp($appid);
if ((bool) $app->enhanced === true) {
if ((bool)$app->enhanced === true) {
$item = $itemId ? Item::find($itemId) : Item::where('appid', $appid)->first();
// if(!isset($app->config)) { // class based config
$output['custom'] = className($appdetails->name) . '.config';
$output['appvalue'] = $item->description;
// }
}
@@ -415,7 +462,6 @@ class ItemController extends Controller
}
/**
* @param Request $request
* @return void
*/
public function testConfig(Request $request)
@@ -438,38 +484,59 @@ class ItemController extends Controller
}
$app_details = new $app();
$app_details->config = (object) $data;
$app_details->config = (object)$data;
$app_details->test();
}
/**
* @param $url
* @param array $attrs
* @param array|bool $overridevars
* @return ResponseInterface|null
* @throws GuzzleException
*/
public function execute($url, array $attrs = [], $overridevars = false): ?ResponseInterface
{
$vars = ($overridevars !== false) ?
$overridevars : [
'http_errors' => false,
'timeout' => 15,
'connect_timeout' => 15,
'verify' => false,
];
// Default Guzzle client configuration
$clientOptions = [
'http_errors' => false,
'timeout' => 15,
'connect_timeout' => 15,
'verify' => false, // In production, set this to `true` and manage certs.
];
$client = new Client($vars);
// If the user provided overrides, use them.
if ($overridevars !== false) {
$clientOptions = $overridevars;
}
// Resolve the hostname to an IP address
$host = parse_url($url, PHP_URL_HOST);
$ip = gethostbyname($host);
// Check if the IP is private or reserved
$allowInternalIps = env('ALLOW_INTERNAL_REQUESTS', false);
if (!$allowInternalIps && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {
Log::warning('Blocked access to private or reserved IPs.', ['ip' => $ip, 'host' => $host]);
abort(Response::HTTP_FORBIDDEN, 'Access to private or reserved IPs is not allowed.');
}
// Force Guzzle to use the resolved IP address
$clientOptions['curl'][CURLOPT_RESOLVE] = ["{$host}:80:{$ip}", "{$host}:443:{$ip}"];
$client = new Client($clientOptions);
$method = 'GET';
try {
return $client->request($method, $url, $attrs);
} catch (ConnectException $e) {
Log::error('Connection refused');
Log::debug($e->getMessage());
Log::warning('SSRF Attempt Blocked: Connection to a private IP was prevented.', [
'url' => $url,
'error' => $e->getMessage()
]);
return null;
} catch (ServerException $e) {
Log::debug($e->getMessage());
} catch (\Exception $e) {
Log::error('General error: ' . $e->getMessage());
}
return null;
@@ -477,15 +544,26 @@ class ItemController extends Controller
/**
* @param $url
* @return StreamInterface
* @throws GuzzleException
*/
public function websitelookup($url): StreamInterface
{
$url = base64_decode($url);
$data = $this->execute($url);
$decodedUrl = base64_decode($url);
return $data->getBody();
// Validate the URL format.
if (filter_var($decodedUrl, FILTER_VALIDATE_URL) === false) {
abort(Response::HTTP_BAD_REQUEST, 'Invalid URL format provided.');
}
$response = $this->execute($decodedUrl);
// If execute() returns null, it means the connection failed.
// This can happen for many reasons, including our SSRF protection kicking in.
if ($response === null) {
abort(Response::HTTP_FORBIDDEN, 'Access to the requested resource is not allowed or the resource is unavailable.');
}
return $response->getBody();
}
/**
@@ -507,7 +585,7 @@ class ItemController extends Controller
/**
* @return \Illuminate\Contracts\Foundation\Application|RedirectResponse|Redirector
*/
public function checkAppList()
public function checkAppList(): RedirectResponse
{
ProcessApps::dispatch();
$route = route('items.index');

View File

@@ -17,10 +17,8 @@ class ItemRestController extends Controller
/**
* Display a listing of the resource.
*
* @return Collection
*/
public function index()
public function index(): Collection
{
$columns = [
'title',
@@ -49,9 +47,6 @@ class ItemRestController extends Controller
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return object
*/
public function store(Request $request): object
{
@@ -66,45 +61,32 @@ class ItemRestController extends Controller
/**
* Display the specified resource.
*
* @param Item $item
* @return Response
*/
public function show(Item $item)
public function show(Item $item): Response
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param Item $item
* @return Response
*/
public function edit(Item $item)
public function edit(Item $item): Response
{
//
}
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param Item $item
* @return Response
*/
public function update(Request $request, Item $item)
public function update(Request $request, Item $item): Response
{
//
}
/**
* Remove the specified resource from storage.
*
* @param Item $item
* @return Response
*/
public function destroy(Item $item)
public function destroy(Item $item): Response
{
//
}

View File

@@ -11,7 +11,6 @@ use Illuminate\Routing\Redirector;
class SearchController extends Controller
{
/**
* @param Request $request
* @return Application|RedirectResponse|Redirector|mixed|void
*/
public function index(Request $request)
@@ -19,16 +18,26 @@ class SearchController extends Controller
$requestprovider = $request->input('provider');
$query = $request->input('q');
// Sanitize the query to prevent XSS
$query = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');
// Validate the presence and non-emptiness of the query parameter
if (!$query || trim($query) === '') {
abort(400, 'Missing or empty query parameter');
}
$provider = Search::providerDetails($requestprovider);
if (!$provider || !isset($provider->type)) {
abort(404, 'Invalid provider');
}
if ($provider->type == 'standard') {
return redirect($provider->url.'?'.$provider->query.'='.urlencode($query));
} elseif ($provider->type == 'external') {
$class = new $provider->class;
//print_r($provider);
return $class->getResults($query, $provider);
}
//print_r($provider);
}
abort(404, 'Provider type not supported');}
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Setting;
use App\SettingGroup;
use Exception;
use enshrined\svgSanitize\Sanitizer;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
@@ -17,9 +18,6 @@ class SettingsController extends Controller
$this->middleware('allowed');
}
/**
* @return View
*/
public function index(): View
{
$settings = SettingGroup::with([
@@ -32,7 +30,6 @@ class SettingsController extends Controller
}
/**
* @param int $id
*
* @return RedirectResponse|View
*/
@@ -48,6 +45,7 @@ class SettingsController extends Controller
if (! is_null($setting)) {
return view('settings.edit')->with([
'setting' => $setting,
'value' => $setting->value,
]);
} else {
$route = route('settings.list', []);
@@ -59,12 +57,6 @@ class SettingsController extends Controller
}
}
/**
* @param Request $request
* @param int $id
*
* @return RedirectResponse
*/
public function update(Request $request, int $id): RedirectResponse
{
$setting = Setting::find($id);
@@ -77,13 +69,31 @@ class SettingsController extends Controller
}
if ($setting->type === 'image') {
$validatedData = $request->validate([
'value' => 'image',
]);
if (!$request->hasFile('value')) {
throw new \Exception(
'file_too_big'
);
throw new \Exception('file_too_big');
}
$path = $request->file('value')->store('backgrounds');
$image = $request->file('value');
$extension = $image->getClientOriginalExtension();
if ($extension === 'svg') {
$sanitizer = new Sanitizer();
$sanitizedSvg = $sanitizer->sanitize(file_get_contents($image->getRealPath()));
// Verify that the sanitization removed malicious content
if (strpos($sanitizedSvg, '<script>') !== false) {
throw new \Exception('SVG contains malicious content and cannot be uploaded.');
}
// Save the sanitized SVG back to the file
file_put_contents($image->getRealPath(), $sanitizedSvg);
}
$path = $image->store('backgrounds', 'public');
if ($path === null) {
throw new \Exception('file_not_stored');
@@ -105,16 +115,11 @@ class SettingsController extends Controller
} catch (Exception $e) {
return redirect($route)
->with([
'errors' => collect([__('app.alert.error.'.$e->getMessage())]),
'errors' => collect([__('app.alert.error.' . $e->getMessage())]),
]);
}
}
/**
* @param int $id
*
* @return RedirectResponse
*/
public function clear(int $id): RedirectResponse
{
$user = $this->user();

View File

@@ -22,7 +22,7 @@ class TagController extends Controller
*
* @return Application|Factory|View
*/
public function index(Request $request)
public function index(Request $request): \Illuminate\View\View
{
$trash = (bool) $request->input('trash');
@@ -40,7 +40,7 @@ class TagController extends Controller
*
* @return Application|Factory|View
*/
public function create()
public function create(): \Illuminate\View\View
{
$data = [];
@@ -49,18 +49,16 @@ class TagController extends Controller
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/
public function store(Request $request): RedirectResponse
{
$validatedData = $request->validate([
'title' => 'required|max:255',
'file' => 'image'
]);
if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$path = $request->file('file')->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
@@ -89,13 +87,17 @@ class TagController extends Controller
* Display the specified resource.
*
* @param $slug
* @return View
*/
public function show($slug): View
public function show($slug, Request $request): View
{
$item = Item::whereUrl($slug)->first();
//print_r($item);
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
if (config('app.auth_roles_enable')) {
$roles = explode(config('app.auth_roles_delimiter'), $request->header(config('app.auth_roles_header')));
$data['apps'] = $item->children()->whereIn('role', $roles)->pinned()->orderBy('order', 'asc')->get();
} else {
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
}
$data['tag'] = $item->id;
$data['all_apps'] = $item->children;
@@ -104,9 +106,6 @@ class TagController extends Controller
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return View
*/
public function edit(int $id): View
{
@@ -120,19 +119,16 @@ class TagController extends Controller
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/
public function update(Request $request, int $id): RedirectResponse
{
$validatedData = $request->validate([
'title' => 'required|max:255',
'file' => 'image'
]);
if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$path = $request->file('file')->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
@@ -154,10 +150,6 @@ class TagController extends Controller
/**
* Remove the specified resource from storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/
public function destroy(Request $request, int $id): RedirectResponse
{
@@ -179,9 +171,6 @@ class TagController extends Controller
/**
* Restore the specified resource from soft deletion.
*
* @param int $id
* @return RedirectResponse
*/
public function restore(int $id): RedirectResponse
{

View File

@@ -19,8 +19,6 @@ class UserController extends Controller
/**
* Display a listing of the resource.
*
* @return View
*/
public function index(): View
{
@@ -31,8 +29,6 @@ class UserController extends Controller
/**
* Show the form for creating a new resource.
*
* @return View
*/
public function create(): View
{
@@ -41,7 +37,7 @@ class UserController extends Controller
return view('users.create', $data);
}
public function selectUser()
public function selectUser(): \Illuminate\View\View
{
Auth::logout();
$data['users'] = User::all();
@@ -51,9 +47,6 @@ class UserController extends Controller
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/
public function store(Request $request): RedirectResponse
{
@@ -62,7 +55,7 @@ class UserController extends Controller
'email' => 'required|email',
'password' => 'nullable|confirmed',
'password_confirmation' => 'nullable',
'file' => 'image'
]);
$user = new User;
$user->username = $request->input('username');
@@ -75,7 +68,7 @@ class UserController extends Controller
}
if ($request->hasFile('file')) {
$path = $request->file('file')->store('avatars');
$path = $request->file('file')->store('avatars', 'public');
$user->avatar = $path;
}
@@ -93,9 +86,6 @@ class UserController extends Controller
/**
* Display the specified resource.
*
* @param int $id
* @return void
*/
public function show(int $id): void
{
@@ -104,9 +94,6 @@ class UserController extends Controller
/**
* Show the form for editing the specified resource.
*
* @param User $user
* @return View
*/
public function edit(User $user): View
{
@@ -117,10 +104,6 @@ class UserController extends Controller
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param User $user
* @return RedirectResponse
*/
public function update(Request $request, User $user): RedirectResponse
{
@@ -129,6 +112,7 @@ class UserController extends Controller
'email' => 'required|email',
'password' => 'nullable|confirmed',
'password_confirmation' => 'nullable',
'file' => 'image'
]);
//die(print_r($request->all()));
@@ -144,7 +128,7 @@ class UserController extends Controller
}
if ($request->hasFile('file')) {
$path = $request->file('file')->store('avatars');
$path = $request->file('file')->store('avatars', 'public');
$user->avatar = $path;
}
@@ -165,7 +149,6 @@ class UserController extends Controller
/**
* Remove the specified resource from storage.
*
* @param User $user
* @return RedirectResponse | void
*/
public function destroy(User $user): RedirectResponse

View File

@@ -1,62 +0,0 @@
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'allowed' => \App\Http\Middleware\CheckAllowed::class,
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];
}

View File

@@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use App\User;
use Closure;
use Illuminate\Auth\AuthenticationException;
@@ -15,12 +16,9 @@ class CheckAllowed
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @return mixed
* @throws AuthenticationException
*/
public function handle(Request $request, Closure $next)
public function handle(Request $request, Closure $next): Response
{
$route = Route::currentRouteName();
$current_user = User::currentUser();

View File

@@ -1,17 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}

View File

@@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use Symfony\Component\HttpFoundation\Response;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
@@ -10,13 +11,8 @@ class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle(Request $request, Closure $next, string $guard = null)
public function handle(Request $request, Closure $next, string $guard = null): Response
{
if (Auth::guard($guard)->check()) {
return redirect()->intended();

View File

@@ -1,18 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}

View File

@@ -2,7 +2,7 @@
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
@@ -19,5 +19,5 @@ class TrustProxies extends Middleware
*
* @var array
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
'order',
'appload',
'test_config',
//'get_stats'
];
}

View File

@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Casts\Attribute;
use stdClass;
use Symfony\Component\ClassLoader\ClassMapGenerator;
@@ -32,6 +33,7 @@ use Symfony\Component\ClassLoader\ClassMapGenerator;
* @property string|null $class
* @property string|null $appid
* @property string|null $appdescription
* @property string|null $role
* @property-read \Illuminate\Database\Eloquent\Collection|Item[] $children
* @property-read int|null $children_count
* @property-read string $droppable
@@ -50,6 +52,7 @@ use Symfony\Component\ClassLoader\ClassMapGenerator;
* @method static Builder|Item pinned()
* @method static Builder|Item query()
* @method static Builder|Item whereAppdescription($value)
* @method static Builder|Item whereRole($value)
* @method static Builder|Item whereAppid($value)
* @method static Builder|Item whereClass($value)
* @method static Builder|Item whereColour($value)
@@ -76,10 +79,7 @@ class Item extends Model
use HasFactory;
/**
* @return void
*/
protected static function boot()
protected static function boot(): void
{
parent::boot();
@@ -107,15 +107,13 @@ class Item extends Model
'user_id',
'tag_id',
'appid',
'role',
];
/**
* Scope a query to only include pinned items.
*
* @param Builder $query
* @return Builder
*/
public function scopePinned(Builder $query): Builder
{
@@ -139,29 +137,33 @@ class Item extends Model
$id = $this->id;
$tags = ItemTag::select('tag_id')->where('item_id', $id)->pluck('tag_id')->toArray();
$tagdetails = self::select('id', 'title', 'url', 'pinned')->whereIn('id', $tags)->get();
//print_r($tags);
if (in_array(0, $tags)) {
$details = new self([
'id' => 0,
'title' => __('app.dashboard'),
'url' => '',
'pinned' => 0,
]);
$tagdetails->prepend($details);
}
return $tagdetails;
}
/**
* @return string
*/
protected function title(): Attribute
{
return Attribute::make(
get: fn (mixed $value) => ($value === 'app.dashboard' ? __('app.dashboard') : $value),
);
}
protected function tagUrl(): Attribute
{
return Attribute::make(
get: fn (mixed $value, array $attributes) => ($attributes['id'] === 0 ? '0-dash' : $attributes['url']),
);
}
public function getTagClass(): string
{
$tags = $this->tags();
$slugs = [];
foreach ($tags as $tag) {
if ($tag->id === 0) {
$tag->url = '0-dash';
}
if ($tag->url) {
$slugs[] = 'tag-'.$tag->url;
}
@@ -170,17 +172,25 @@ class Item extends Model
return implode(' ', $slugs);
}
/**
* @return BelongsToMany
*/
public function getTagList(): string
{
$tags = $this->tags();
$titles = [];
// print_r($tags);
foreach ($tags as $tag) {
if ($tag->title) {
$titles[] = $tag->title;
}
}
return implode(', ', $titles);
}
public function parents(): BelongsToMany
{
return $this->belongsToMany(Item::class, 'item_tag', 'item_id', 'tag_id');
}
/**
* @return BelongsToMany
*/
public function children(): BelongsToMany
{
return $this->belongsToMany(Item::class, 'item_tag', 'tag_id', 'item_id');
@@ -198,9 +208,6 @@ class Item extends Model
}
}
/**
* @return string
*/
public function getDroppableAttribute(): string
{
if ((int) $this->type === 1) {
@@ -210,9 +217,6 @@ class Item extends Model
}
}
/**
* @return string
*/
public function getLinkTargetAttribute(): string
{
$target = Setting::fetch('window_target');
@@ -224,9 +228,6 @@ class Item extends Model
}
}
/**
* @return string
*/
public function getLinkIconAttribute(): string
{
if ((int) $this->type === 1) {
@@ -236,9 +237,6 @@ class Item extends Model
}
}
/**
* @return string
*/
public function getLinkTypeAttribute(): string
{
if ((int) $this->type === 1) {
@@ -279,9 +277,6 @@ class Item extends Model
return $query->where('type', $typeid);
}
/**
* @return bool
*/
public function enhanced(): bool
{
/*if(isset($this->class) && !empty($this->class)) {
@@ -295,7 +290,6 @@ class Item extends Model
/**
* @param $class
* @return bool
*/
public static function isEnhanced($class): bool
{
@@ -321,9 +315,6 @@ class Item extends Model
return ((bool) ($app instanceof SearchInterface)) ? $app : false;
}
/**
* @return bool
*/
public function enabled(): bool
{
if ($this->enhanced()) {
@@ -369,7 +360,6 @@ class Item extends Model
/**
* @param $class
* @return Application|null
*/
public static function applicationDetails($class): ?Application
{
@@ -386,7 +376,6 @@ class Item extends Model
/**
* @param $class
* @return string
*/
public static function getApplicationDescription($class): string
{
@@ -400,8 +389,6 @@ class Item extends Model
/**
* Get the user that owns the item.
*
* @return BelongsTo
*/
public function user(): BelongsTo
{

View File

@@ -32,10 +32,9 @@ class ProcessApps implements ShouldQueue, ShouldBeUnique
/**
* Execute the job.
*
* @return void
* @throws GuzzleException
*/
public function handle()
public function handle(): void
{
Log::debug('Process Apps dispatched');
$localapps = Application::whereNull('class')->get();

View File

@@ -30,10 +30,9 @@ class UpdateApps implements ShouldQueue, ShouldBeUnique
/**
* Execute the job.
*
* @return void
* @throws GuzzleException
*/
public function handle()
public function handle(): void
{
Log::debug('Update of all apps triggered!');
$apps = Application::all('appid')->toArray();
@@ -50,10 +49,7 @@ class UpdateApps implements ShouldQueue, ShouldBeUnique
Cache::lock('updateApps')->forceRelease();
}
/**
* @return void
*/
public function failed($exception)
public function failed($exception): void
{
Cache::lock('updateApps')->forceRelease();
}

View File

@@ -10,19 +10,20 @@ use App\User;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use App\Services\CustomFormBuilder;
use Spatie\Html\Html;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
public function boot(): void
{
if (! class_exists('ZipArchive')) {
die('You are missing php-zip');
@@ -73,7 +74,12 @@ class AppServiceProvider extends ServiceProvider
}
$alt_bg = '';
if ($bg_image = Setting::fetch('background_image')) {
$trianglify = 'false';
$trianglify_seed = null;
if (Setting::fetch('trianglify')) {
$trianglify = 'true';
$trianglify_seed = Setting::fetch('trianglify_seed');
} elseif ($bg_image = Setting::fetch('background_image')) {
$alt_bg = ' style="background-image: url(storage/'.$bg_image.')"';
}
@@ -81,8 +87,15 @@ class AppServiceProvider extends ServiceProvider
$current_user = User::currentUser();
$view->with('alt_bg', $alt_bg);
$view->with('trianglify', $trianglify);
$view->with('trianglify_seed', $trianglify_seed);
$view->with('allusers', $allusers);
$view->with('current_user', $current_user);
if (config('app.auth_roles_enable')) {
$view->with('enable_auth_admin_controls', in_array(config('app.auth_roles_admin'), explode(config('app.auth_roles_delimiter'), $_SERVER[config('app.auth_roles_http_header')])));
} else {
$view->with('enable_auth_admin_controls', true);
}
});
$this->app['view']->addNamespace('SupportedApps', app_path('SupportedApps'));
@@ -98,10 +111,8 @@ class AppServiceProvider extends ServiceProvider
/**
* Generate app key if missing and .env exists
*
* @return void
*/
public function genKey()
public function genKey(): void
{
if (is_file(base_path('.env'))) {
if (empty(env('APP_KEY'))) {
@@ -112,15 +123,17 @@ class AppServiceProvider extends ServiceProvider
/**
* Register any application services.
*
* @return void
*/
public function register()
public function register(): void
{
if ($this->app->isLocal()) {
$this->app->register(IdeHelperServiceProvider::class);
}
$this->app->singleton('custom-form', function ($app) {
return new CustomFormBuilder($app->make(Html::class));
});
$this->app->singleton('settings', function () {
return new Setting();
});
@@ -129,7 +142,6 @@ class AppServiceProvider extends ServiceProvider
/**
* Check if database needs an update or do first time database setup
*
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@@ -139,6 +151,7 @@ class AppServiceProvider extends ServiceProvider
if ($db_type == 'sqlite') {
$db_file = database_path(env('DB_DATABASE', 'app.sqlite'));
Log::debug('SQLite Database Path: ' . $db_file);
if (! is_file($db_file)) {
touch($db_file);
}
@@ -151,9 +164,6 @@ class AppServiceProvider extends ServiceProvider
}
}
/**
* @return void
*/
public function createEnvFile(): void
{
if (!is_file(base_path('.env'))) {
@@ -163,9 +173,6 @@ class AppServiceProvider extends ServiceProvider
$this->genKey();
}
/**
* @return bool
*/
private function needsDBUpdate(): bool
{
if (!Schema::hasTable('settings')) {
@@ -178,10 +185,7 @@ class AppServiceProvider extends ServiceProvider
return version_compare($app_version, $db_version) === 1;
}
/**
* @return void
*/
private function updateApps()
private function updateApps(): void
{
// This lock ensures that the job is not invoked multiple times.
// In 5 minutes all app updates should be finished.

View File

@@ -1,29 +0,0 @@
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}

View File

@@ -14,14 +14,11 @@ class RouteServiceProvider extends ServiceProvider
*
* REMOVED WITH LARAVEL 8 UPGRADE
*/
// protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
public function boot(): void
{
//
@@ -30,10 +27,8 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
public function map(): void
{
$this->mapApiRoutes();
@@ -46,13 +41,10 @@ class RouteServiceProvider extends ServiceProvider
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
protected function mapWebRoutes(): void
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
@@ -60,14 +52,11 @@ class RouteServiceProvider extends ServiceProvider
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
protected function mapApiRoutes(): void
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}

View File

@@ -2,9 +2,8 @@
namespace App;
use Cache;
use Form;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request as Input;
use Yaml;
abstract class Search
@@ -106,7 +105,7 @@ abstract class Search
if ((bool) $homepage_search !== true) {
return $output;
}
$user_search_provider = $user_search_provider ?? 'none';
$user_search_provider = Input::get('p') ?? $user_search_provider ?? 'none';
if ((bool) $search_provider) {
if ((bool) $user_search_provider) {
@@ -122,15 +121,7 @@ abstract class Search
$output .= '<option value="'.$key.'"'.$selected.'>'.$searchprovider['name'].'</option>';
}
$output .= '</select>';
$output .= Form::text(
'q',
null,
[
'class' => 'homesearch',
'autofocus' => 'autofocus',
'placeholder' => __('app.settings.search').'...'
]
);
$output .= '<input type="text" name="q" value="'.e(Input::get('q') ?? '').'" class="homesearch" autofocus placeholder="'.__('app.settings.search').'..." />';
$output .= '<button type="submit">'.ucwords(__('app.settings.search')).'</button>';
$output .= '</div>';
$output .= '</form>';

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Services;
use Spatie\Html\Html;
use Illuminate\Support\HtmlString;
class CustomFormBuilder
{
protected Html $html;
public function __construct(Html $html)
{
$this->html = $html;
}
public function text($name, $value = null, $options = [])
{
return new HtmlString(
$this->html->input('text', $name, $value)->attributes($options)
);
}
public function select($name, $list = [], $selected = null, $options = [])
{
return new HtmlString(
$this->html->select($name)->options($list, $selected)->attributes($options)
);
}
public function textarea($name, $value = null, $options = [])
{
return new HtmlString(
$this->html->textarea($name, $value)->attributes($options)
);
}
public function input($type, $name, $value = null, $options = [])
{
return new HtmlString(
$this->html->input($type, $name, $value)->attributes($options)
);
}
// Add other methods as needed
}

View File

@@ -2,7 +2,6 @@
namespace App;
use Form;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -10,7 +9,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Http\Request;
use Illuminate\Session\SessionManager;
use Illuminate\Session\Store;
use Illuminate\Support\Facades\Input;
use enshrined\svgSanitize\Sanitizer;
/**
* App\Setting
@@ -70,15 +69,25 @@ class Setting extends Model
*/
protected static $cache = [];
/**
* @param Request $request
* @return object
*/
public static function getInput(Request $request): object
{
$image = $request->file('value');
if ($image && $image->getClientOriginalExtension() === 'svg') {
$sanitizer = new Sanitizer();
$sanitizedSvg = $sanitizer->sanitize(file_get_contents($image->getRealPath()));
// Verify that the sanitization removed malicious content
if (strpos($sanitizedSvg, '<script>') !== false) {
throw new \Exception('SVG contains malicious content and cannot be uploaded.');
}
// Save the sanitized SVG back to the file
file_put_contents($image->getRealPath(), $sanitizedSvg);
}
return (object) [
'value' => $request->input('value'),
'image' => $request->file('value'),
'image' => $image,
];
}
@@ -141,73 +150,70 @@ class Setting extends Model
switch ($this->type) {
case 'image':
$value = '';
if (isset($this->value) && ! empty($this->value)) {
$value .= '<a class="setting-view-image" href="'.
asset('storage/'.$this->value).
'" title="'.
__('app.settings.view').
'" target="_blank"><img src="'.
asset('storage/'.
$this->value).
if (isset($this->value) && !empty($this->value)) {
$value .= '<a class="setting-view-image" href="' .
asset('storage/' . $this->value) .
'" title="' .
__('app.settings.view') .
'" target="_blank"><img src="' .
asset('storage/' .
$this->value) .
'" /></a>';
}
$value .= Form::file('value', ['class' => 'form-control']);
if (isset($this->value) && ! empty($this->value)) {
$value .= '<a class="settinglink" href="'.
route('settings.clear', $this->id).
'" title="'.
__('app.settings.remove').
'">'.
__('app.settings.reset').
$value .= '<input type="file" name="value" class="form-control" />';
if (isset($this->value) && !empty($this->value)) {
$value .= '<a class="settinglink" href="' .
route('settings.clear', $this->id) .
'" title="' .
__('app.settings.remove') .
'">' .
__('app.settings.reset') .
'</a>';
}
break;
case 'boolean':
$checked = false;
if (isset($this->value) && (bool) $this->value === true) {
if (isset($this->value) && (bool)$this->value === true) {
$checked = true;
}
$set_checked = ($checked) ? ' checked="checked"' : '';
$value = '
<input type="hidden" name="value" value="0" />
<label class="switch">
<input type="checkbox" name="value" value="1"'.$set_checked.' />
<input type="checkbox" name="value" value="1"' . $set_checked . ' />
<span class="slider round"></span>
</label>';
break;
case 'select':
$options = json_decode($this->options);
if ($this->key === 'search_provider') {
$options = Search::providers()->pluck('name', 'id');
}
$value = '<select name="value" class="form-control">';
foreach ($options as $key => $opt) {
$options->$key = __($opt);
$value .= '<option value="' . $key . '" ' . (($this->value == $key) ? 'selected' : '') . '>' . __($opt) . '</option>';
}
$value = Form::select('value', $options, null, ['class' => 'form-control']);
$value .= '</select>';
break;
case 'textarea':
$value = Form::textarea('value', null, ['class' => 'form-control', 'cols' => '44', 'rows' => '15']);
$value = '<textarea name="value" class="form-control" cols="44" rows="15">' . htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8') . '</textarea>';
break;
default:
$value = Form::text('value', null, ['class' => 'form-control']);
$value = '<input type="text" name="value" class="form-control" value="' . htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8') . '" />';
break;
}
return $value;
}
/**
* @return BelongsTo
*/
public function group(): BelongsTo
{
return $this->belongsTo(\App\SettingGroup::class, 'group_id');
}
/**
* @param string $key
*
* @return mixed
*/
@@ -220,11 +226,10 @@ class Setting extends Model
// @codingStandardsIgnoreStart
/**
* @param string $key
*
* @return mixed
*/
public static function _fetch($key, $user = null)
public static function _fetch(string $key, $user = null)
{
// @codingStandardsIgnoreEnd
//$cachekey = ($user === null) ? $key : $key.'-'.$user->id;
@@ -267,20 +272,14 @@ class Setting extends Model
}
/**
* @param string $key
* @param $value
*/
public static function add($key, $value)
public static function add(string $key, $value)
{
self::$cache[$key] = $value;
}
/**
* @param string $key
*
* @return bool
*/
public static function cached($key): bool
public static function cached(string $key): bool
{
return array_key_exists($key, self::$cache);
}

View File

@@ -37,9 +37,6 @@ class SettingGroup extends Model
*/
public $timestamps = false;
/**
* @return HasMany
*/
public function settings(): HasMany
{
return $this->hasMany(\App\Setting::class, 'group_id');

View File

@@ -134,7 +134,7 @@ abstract class SupportedApps
*/
public function getLiveStats($status, $data)
{
$className = get_class($this);
$className = $this::class;
$explode = explode('\\', $className);
$name = end($explode);

50
artisan
View File

@@ -1,53 +1,15 @@
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput);
exit($status);

View File

@@ -1,55 +1,43 @@
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
return Application::configure(basePath: dirname(__DIR__))
->withProviders([
\Spatie\Html\HtmlServiceProvider::class,
])
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
channels: __DIR__.'/../routes/channels.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->redirectGuestsTo(fn () => route('login'));
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$middleware->validateCsrfTokens(except: [
//
'order',
'appload',
'test_config',
//'get_stats'
]);
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$middleware->append(\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$middleware->throttleApi('60,1');
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
$middleware->replace(\Illuminate\Http\Middleware\TrustProxies::class, \App\Http\Middleware\TrustProxies::class);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
$middleware->alias([
'allowed' => \App\Http\Middleware\CheckAllowed::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();

7
bootstrap/providers.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
return [
App\Providers\AppServiceProvider::class,
App\Providers\FormMacroServiceProvider::class,
App\Providers\RouteServiceProvider::class,
];

View File

@@ -8,28 +8,29 @@
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.4.32",
"facade/ignition": "^2.3.6",
"fideloper/proxy": "^4.0",
"graham-campbell/github": "^10.5",
"guzzlehttp/guzzle": "^7.4",
"laravel/framework": "^8.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"laravelcollective/html": "^6.0",
"nunomaduro/collision": "^5.0",
"symfony/yaml": "^5.4",
"php": "^8.2",
"ext-intl": "*",
"ext-json": "*",
"ext-intl": "*"
"enshrined/svg-sanitize": "^0.21.0",
"graham-campbell/github": "^12.5",
"guzzlehttp/guzzle": "^7.8",
"laravel/framework": "^11.45",
"laravel/tinker": "^2.9",
"laravel/ui": "^4.4",
"league/flysystem-aws-s3-v3": "^3.0",
"nunomaduro/collision": "^8.0",
"spatie/laravel-html": "^3.11",
"spatie/laravel-ignition": "^2.4",
"symfony/yaml": "^7.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.12",
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~9.0",
"barryvdh/laravel-ide-helper": "^3.0",
"filp/whoops": "^2.8",
"mockery/mockery": "^1.6",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "3.*",
"symfony/thanks": "^1.0"
"symfony/thanks": "^1.2",
"fakerphp/faker": "^1.23"
},
"autoload": {
"classmap": [
@@ -71,7 +72,8 @@
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:meta"
"@php artisan ide-helper:meta",
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
]
},
"config": {
@@ -80,7 +82,10 @@
"optimize-autoloader": true,
"allow-plugins": {
"kylekatarnls/update-helper": true,
"symfony/thanks": true
"symfony/thanks": true,
"php-http/discovery": true
}
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

6334
composer.lock generated

File diff suppressed because it is too large Load Diff

0
config/.gitkeep Normal file
View File

View File

@@ -1,240 +1,32 @@
<?php
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Facade;
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'version' => '2.7.3',
'name' => env('APP_NAME', 'Heimdall'),
'version' => '2.5.6',
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
'appsource' => env('APP_SOURCE', 'https://appslist.heimdall.site/'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'allow_internal_requests' => env('ALLOW_INTERNAL_REQUESTS', false),
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY', 'base64:I206O8ibx+GQyRE7BeOxDobn04Mfmyyc5Ptzns/C0mY='),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
Collective\Html\HtmlServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Form' => Collective\Html\FormFacade::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Html' => Collective\Html\HtmlFacade::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Yaml' => Symfony\Component\Yaml\Yaml::class,
'SupportedApps' => App\SupportedApps::class,
'aliases' => Facade::defaultAliases()->merge([
'EnhancedApps' => App\EnhancedApps::class,
'Form' => App\Facades\Form::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'SupportedApps' => App\SupportedApps::class,
'Yaml' => Symfony\Component\Yaml\Yaml::class,
])->toArray(),
],
'auth_roles_enable' => (bool) env('AUTH_ROLES_ENABLE', false),
'auth_roles_header' => env('AUTH_ROLES_HEADER', 'remote-groups'),
'auth_roles_http_header' => env('AUTH_ROLES_HTTP_HEADER', 'HTTP_REMOTE_GROUPS'),
'auth_roles_admin' => env('AUTH_ROLES_ADMIN', 'admin'),
'auth_roles_delimiter' => env('AUTH_ROLES_DELIMITER', ','),
];

View File

@@ -2,116 +2,18 @@
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
'model' => App\User::class, // Update this to the correct namespace
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];

View File

@@ -1,59 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];

View File

@@ -1,103 +0,0 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];

View File

@@ -1,146 +1,22 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'), // Make sure the default connection is set
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
//'database' => env('DB_DATABASE', database_path('database.sqlite')),
'database' => database_path(env('DB_DATABASE', 'app.sqlite')),
'database' => database_path(env('DB_DATABASE', 'app.sqlite')), // Make sure to use the correct path
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), // Enable foreign key constraints
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => false, // disable to preserve original behavior for existing applications
],
];

View File

@@ -2,69 +2,14 @@
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'public'),
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
],
],
];

View File

@@ -1,52 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];

View File

@@ -1,104 +0,0 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'daily'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

View File

@@ -2,116 +2,15 @@
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
'mailers' => [
'mailgun' => [
'transport' => 'mailgun',
// 'client' => [
// 'timeout' => 5,
// ],
],
],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',

View File

@@ -1,89 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];

View File

@@ -2,32 +2,11 @@
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
];

View File

@@ -1,199 +0,0 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION', null),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
|
*/
'store' => env('SESSION_STORE', null),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you if it can not be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place.
|
| Supported: "lax", "strict"
|
*/
'same_site' => null,
];

0
database/.gitignore vendored Normal file → Executable file
View File

9
database/factories/ItemFactory.php Normal file → Executable file
View File

@@ -7,17 +7,8 @@ use Illuminate\Database\Eloquent\Factories\Factory;
class ItemFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Item::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{

9
database/factories/ItemTagFactory.php Normal file → Executable file
View File

@@ -8,17 +8,8 @@ use Illuminate\Database\Eloquent\Factories\Factory;
class ItemTagFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = ItemTag::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{

18
database/factories/UserFactory.php Normal file → Executable file
View File

@@ -2,30 +2,26 @@
namespace Database\Factories;
use Illuminate\Support\Facades\Hash;
use App\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = User::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
protected static ?string $password;
public function definition(): array
{
return [
'username' => $this->faker->name(),
'email' => $this->faker->unique()->safeEmail(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'password' => static::$password ??= Hash::make('password'),
'public_front' => 1,
'remember_token' => Str::random(10),
];
@@ -33,10 +29,8 @@ class UserFactory extends Factory
/**
* Indicate that the model's email address should be unverified.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
public function unverified()
public function unverified(): Factory
{
return $this->state(function (array $attributes) {
return [

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateItemsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('items', function (Blueprint $table) {
$table->increments('id');
@@ -29,11 +27,9 @@ class CreateItemsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('items');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSettingsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
$table->increments('id');
@@ -28,11 +26,9 @@ class CreateSettingsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('settings');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSettingGroupsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('setting_groups', function (Blueprint $table) {
$table->increments('id');
@@ -22,11 +20,9 @@ class CreateSettingGroupsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('setting_groups');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnsToItemsForGroups extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->integer('type')->default(0)->index(); // 0 = item, 1 = category
@@ -20,13 +18,11 @@ class AddColumnsToItemsForGroups extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
$table->dropColumn(['type']);
});
}
}
};

12
database/migrations/2018_02_16_193703_item_tag.php Normal file → Executable file
View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ItemTag extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('item_tag', function (Blueprint $table) {
$table->integer('item_id')->unsigned()->index();
@@ -25,11 +23,9 @@ class ItemTag extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('item_tag');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
@@ -28,11 +26,9 @@ class CreateUsersTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('users');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
@@ -22,11 +20,9 @@ class CreatePasswordResetsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('password_resets');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddUserIdToItemsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->integer('user_id')->default(1)->index(); // 0 = item, 1 = category
@@ -20,13 +18,11 @@ class AddUserIdToItemsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
$table->dropColumn(['user_id']);
});
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSettingUserPivotTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('setting_user', function (Blueprint $table) {
$table->integer('setting_id')->unsigned()->index();
@@ -25,11 +23,9 @@ class CreateSettingUserPivotTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('setting_user');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateApplicationsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('applications', function (Blueprint $table) {
$table->string('appid')->unique();
@@ -30,11 +28,9 @@ class CreateApplicationsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('applications');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddClassToItemsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->string('class')->nullable();
@@ -20,13 +18,11 @@ class AddClassToItemsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
$table->dropColumn(['class']);
});
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
@@ -26,11 +24,9 @@ class CreateJobsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('jobs');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
@@ -25,11 +23,9 @@ class CreateFailedJobsTable extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('failed_jobs');
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAppidToItems extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->string('appid')->nullable();
@@ -20,13 +18,11 @@ class AddAppidToItems extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
$table->dropColumn(['appid']);
});
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddClassToApplication extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('applications', function (Blueprint $table) {
$table->string('class')->nullable()->index();
@@ -20,13 +18,11 @@ class AddClassToApplication extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('applications', function (Blueprint $table) {
$table->dropColumn(['class']);
});
}
}
};

View File

@@ -4,14 +4,12 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAppDescriptionToItems extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->text('appdescription')->nullable();
@@ -20,13 +18,11 @@ class AddAppDescriptionToItems extends Migration
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
//
});
}
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::table('items', function (Blueprint $table) {
$table->text('role')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::table('items', function (Blueprint $table) {
//
});
}
};

View File

@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::rename('password_resets', 'password_reset_tokens');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::rename('password_reset_tokens', 'password_resets');
}
};

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

4
database/seeders/DatabaseSeeder.php Normal file → Executable file
View File

@@ -8,10 +8,8 @@ class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
public function run(): void
{
$this->call(SettingsSeeder::class);
$this->call(UsersSeeder::class);

55
database/seeders/SettingsSeeder.php Normal file → Executable file
View File

@@ -22,7 +22,7 @@ class SettingsSeeder extends Seeder
return json_encode(['en' => 'English']);
}
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');
$languageDirectories = array_filter(glob(lang_path().'/*'), 'is_dir');
$result = [];
foreach ($languageDirectories as $languageDirectory) {
@@ -52,10 +52,8 @@ class SettingsSeeder extends Seeder
/**
* Run the database seeds.
*
* @return void
*/
public function run()
public function run(): void
{
// Groups
if (! $setting_group = SettingGroup::find(1)) {
@@ -180,6 +178,33 @@ class SettingsSeeder extends Seeder
$setting->value = 'en';
$setting->save();
}
if (! $setting = Setting::find(12)) {
$setting = new Setting;
$setting->id = 12;
$setting->group_id = 2;
$setting->key = 'trianglify';
$setting->type = 'boolean';
$setting->label = 'app.settings.trianglify';
$setting->save();
} else {
$setting->label = 'app.settings.trianglify';
$setting->save();
}
if (! $setting = Setting::find(13)) {
$setting = new Setting;
$setting->id = 13;
$setting->group_id = 2;
$setting->key = 'trianglify_seed';
$setting->type = 'text';
$setting->value = 'heimdall';
$setting->label = 'app.settings.trianglify_seed';
$setting->save();
} else {
$setting->label = 'app.settings.trianglify_seed';
$setting->save();
}
$window_target_options = json_encode([
'current' => 'app.settings.window_target.current',
@@ -302,5 +327,27 @@ class SettingsSeeder extends Seeder
$app->parents()->attach(0);
}
}
$tag_options = json_encode([
'folders' => 'app.settings.folders',
'tags' => 'app.settings.tags',
'categories' => 'app.settings.categories',
]);
if (! $setting = Setting::find(14)) {
$setting = new Setting;
$setting->id = 14;
$setting->group_id = 2;
$setting->key = 'treat_tags_as';
$setting->type = 'select';
$setting->options = $tag_options;
$setting->value = 'folders';
$setting->label = 'app.settings.treat_tags_as';
$setting->save();
} else {
$setting->options = $tag_options;
$setting->label = 'app.settings.treat_tags_as';
$setting->save();
}
}
}

5
database/seeders/UsersSeeder.php Normal file → Executable file
View File

@@ -9,10 +9,8 @@ class UsersSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
public function run(): void
{
// Groups
if (!User::find(1)) {
@@ -20,6 +18,7 @@ class UsersSeeder extends Seeder
$user->username = 'admin';
$user->email = 'admin@test.com';
$user->password = null;
$user->public_front = 0; // Default value for public_front
$user->save();
$user_id = $user->id;

26
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,26 @@
version: "3"
services:
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
ports:
- "8080:80"
networks:
- internal
volumes:
- ../:/var/www/html
php:
build:
context: .
dockerfile: php/Dockerfile
networks:
- internal
environment:
XDEBUG_MODE: debug
XDEBUG_CONFIG: client_host=host.docker.internal client_port=9003
volumes:
- ../:/var/www/html
networks:
internal:
driver: bridge

2
docker/nginx/Dockerfile Normal file
View File

@@ -0,0 +1,2 @@
FROM nginx:alpine
COPY ./default.conf /etc/nginx/conf.d

19
docker/nginx/default.conf Normal file
View File

@@ -0,0 +1,19 @@
server {
listen 0.0.0.0:80;
root /var/www/html;
location / {
index index.php index.html;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}

4
docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,4 @@
FROM php:8.4-fpm
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug

133
lang/br/app.php Normal file
View File

@@ -0,0 +1,133 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| App Language Lines
|--------------------------------------------------------------------------
|
*/
'settings.system' => 'Sistema',
'settings.appearance' => 'Aparência',
'settings.miscellaneous' => 'Diversos',
'settings.support' => 'Ajuda',
'settings.donate' => 'Doar',
'settings.version' => 'Versão',
'settings.background_image' => 'Imagem de fundo',
'settings.trianglify' => 'Trianglify',
'settings.trianglify_seed' => 'Trianglify Random Seed',
'settings.window_target' => 'Link é aberto em',
'settings.window_target.current' => 'Abra nesta aba',
'settings.window_target.one' => 'Abra na mesma aba',
'settings.window_target.new' => 'Abra em uma nova aba',
'settings.homepage_search' => 'Pesquisa na página inicial',
'settings.search_provider' => 'Provedor de pesquisa',
'settings.language' => 'Idioma',
'settings.reset' => 'Redefinir de volta ao padrão',
'settings.remove' => 'Remover',
'settings.search' => 'busca',
'settings.no_items' => 'Nenhum item encontrado',
'settings.advanced' => 'Avançado',
'settings.custom_css' => 'CSS Customizado',
'settings.custom_js' => 'JavaScript Customizado',
'settings.label' => 'Rótulo',
'settings.value' => 'Valor',
'settings.edit' => 'Editar',
'settings.view' => 'Ver',
'options.none' => '- não configurado -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.qwant' => 'Qwant',
'options.startpage' => 'Página inicial',
'options.yes' => 'Sim',
'options.no' => 'Não',
'options.nzbhydra' => 'NZBHydra',
'options.jackett' => 'Jackett',
'buttons.save' => 'Salvar',
'buttons.cancel' => 'Cancelar',
'buttons.add' => 'Adicionar',
'buttons.upload' => 'Carregar um arquivo',
'buttons.downloadapps' => 'Atualizar lista de Apps',
'dashboard' => 'Página Inicial do dashboard',
'dashboard.reorder' => 'Reordenar e fixar itens',
'dashboard.settings' => 'Configurações',
'dash.pin_item' => 'Fixar o item na dashboard',
'dash.no_apps' => 'Atualmente não há aplicativos fixados, :link1 ou :link2',
'dash.link1' => 'Adicionar um aplivativo aqui',
'dash.link2' => 'Fixar um item na dashboard',
'dash.pinned_items' => 'Itens fixados',
'apps.app_list' => 'Lista de aplicativos',
'apps.view_trash' => 'Ver lixo',
'apps.add_application' => 'Adicionar aplicativo',
'apps.application_name' => 'Nome do aplicativo',
'apps.colour' => 'Cor',
'apps.icon' => 'Ícone',
'app.import' => 'Importar',
'apps.pinned' => 'Fixado',
'apps.title' => 'Título',
'apps.hex' => 'Cor hexadecimal',
'apps.username' => 'Nome de usuário',
'apps.password' => 'Senha',
'apps.config' => 'Configuração',
'apps.apikey' => 'API Key',
'apps.enable' => 'Habilitar',
'apps.tag_list' => 'Lista de tags',
'apps.add_tag' => 'Adicionar tag',
'apps.tag_name' => 'Nome da tag',
'apps.tags' => 'Tags',
'apps.override' => 'Se diferente do URL principal',
'apps.preview' => 'Vizualizar',
'apps.apptype' => 'Tipo de Aplicativo',
'apps.website' => 'Website',
'apps.description' => 'Descrição',
'apps.only_admin_account' => 'Somente se tiver conta admin!',
'apps.autologin_url' => 'URL de login automático',
'apps.show_deleted' => 'Mostrando Aplicativos Apagados',
'user.user_list' => 'Comercial',
'user.add_user' => 'Adicionar usuários',
'user.username' => 'Nome de usuário',
'user.avatar' => 'Avatar',
'user.email' => 'O email',
'user.password_confirm' => 'Confirme a Senha',
'user.secure_front' => 'Permitir acesso público à frente - Aplicado apenas se uma senha for definida.',
'user.autologin' => 'Permitir o login a partir de um URL específico. Qualquer pessoa com o link pode fazer o login.',
'url' => 'URL',
'title' => 'Título',
'delete' => 'Apagar',
'optional' => 'Opcional',
'restore' => 'Restaurar',
'export' => 'Exportar',
'import' => 'Importar',
'alert.success.item_created' => 'Item criado com sucesso',
'alert.success.item_updated' => 'Item atualizado com sucesso',
'alert.success.item_deleted' => 'Item apagado com sucesso',
'alert.success.item_restored' => 'Item restaurado com sucesso',
'alert.success.tag_created' => 'Tag criada com sucesso',
'alert.success.tag_updated' => 'Tag atualizada com sucesso',
'alert.success.tag_deleted' => 'Tag apagada com sucesso',
'alert.success.tag_restored' => 'Tag restaurada com sucesso',
'alert.success.updating'=> 'Atualizando lista de apps',
'alert.success.setting_updated' => 'Você editou com sucesso essa configuração',
'alert.error.not_exist' => 'Essa configuração não existe.',
'alert.success.updating' => 'Atualizando lista de Apps',
'alert.success.user_created' => 'Usuário criado com sucesso',
'alert.success.user_updated' => 'Usuário atualizado com sucesso',
'alert.success.user_deleted' => 'Usuário excluído com sucesso',
'alert.success.user_restored' => 'Usuário restaurado com sucesso',
];

108
lang/cs/app.php Normal file
View File

@@ -0,0 +1,108 @@
<?php
return array (
'settings.system' => 'Systém',
'settings.appearance' => 'Vzhled',
'settings.miscellaneous' => 'Různé',
'settings.advanced' => 'Rozšířené nastavení',
'settings.support' => 'Podpora',
'settings.donate' => 'Podpořte nás',
'settings.version' => 'Verze',
'settings.background_image' => 'Obrázek pozadí',
'settings.trianglify' => 'Trianglify',
'settings.trianglify_seed' => 'Trianglify Random Seed',
'settings.window_target' => 'Odkazy otevírat v',
'settings.window_target.current' => 'Otevřít v této záložce',
'settings.window_target.one' => 'Otevřít ve stejné záložce',
'settings.window_target.new' => 'Otevřít v nové záložce',
'settings.homepage_search' => 'Vyhledávání na domovské stránce',
'settings.search_provider' => 'Vyhledávat pomocí',
'settings.language' => 'Jazyk',
'settings.reset' => 'Obnovit výchozí nastavení',
'settings.remove' => 'Odstranit',
'settings.search' => 'hledat',
'settings.no_items' => 'Žadné položky nenalezeny',
'settings.label' => 'Název',
'settings.value' => 'Hodnota',
'settings.edit' => 'Upravit',
'settings.view' => 'Náhled',
'settings.custom_css' => 'Vlastní CSS',
'settings.custom_js' => 'Vlastní JavaScript',
'options.none' => '- nenastaveno -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.qwant' => 'Qwant',
'options.startpage' => 'StartPage',
'options.yes' => 'Ano',
'options.no' => 'Ne',
'options.nzbhydra' => 'NZBHydra',
'options.jackett' => 'Jackett',
'buttons.save' => 'Uložit',
'buttons.cancel' => 'Zrušit',
'buttons.add' => 'Přidat',
'buttons.upload' => 'Nahrát ikonu',
'buttons.downloadapps' => 'Aktualizovat seznam aplikací',
'dash.pin_item' => 'Připnout na dashboard',
'dash.no_apps' => 'Aktuálně nemáte žádné připnuté aplikace, :link1 nebo :link2',
'dash.link1' => 'Přidejte zde aplikacei',
'dash.link2' => 'Připnout na dashboard',
'dash.pinned_items' => 'Připnuté položky',
'apps.app_list' => 'Seznam aplikací',
'apps.view_trash' => 'Zobrazit koš',
'apps.add_application' => 'Přidat aplikaci',
'apps.application_name' => 'Název aplikace',
'apps.colour' => 'Barva',
'apps.icon' => 'Ikona',
'apps.pinned' => 'Připnuto',
'apps.title' => 'Název',
'apps.hex' => 'Hex barva',
'apps.username' => 'Uživatelské jméno',
'apps.password' => 'Heslo',
'apps.config' => 'Config',
'apps.apikey' => 'API Klíč',
'apps.enable' => 'Povolit',
'apps.tag_list' => 'Seznam tagů',
'apps.add_tag' => 'Přidat tag',
'apps.tag_name' => 'Název tagu',
'apps.tags' => 'Tagy',
'apps.override' => 'Pokud je různá od hlavní url',
'apps.preview' => 'Náhled',
'apps.apptype' => 'Typ apliakce',
'apps.website' => 'Webová stránka',
'apps.description' => 'Popis',
'apps.only_admin_account' => 'Pouze pokud máte administrátorský účet!',
'apps.autologin_url' => 'URL automatického přihlášení',
'apps.show_deleted' => 'Zobrazit smazané aplikace',
'dashboard' => 'Domácí obrazovka',
'user.user_list' => 'Uživatelé',
'user.add_user' => 'Přidat uživatele',
'user.username' => 'Uživatelské jméno',
'user.avatar' => 'Avatar',
'user.email' => 'Email',
'user.password_confirm' => 'Potvrdit heslo',
'user.secure_front' => 'Povolit veřejný přístup k rozhraní - Nastavte pouze pokud je nastaveno heslo.',
'user.autologin' => 'Povolit přihlášení ze specifické URL. Kdokoliv s odkazem se může přihlásit.',
'url' => 'URL',
'title' => 'Název',
'delete' => 'Smazat',
'optional' => 'Volitelné',
'restore' => 'Obnovit',
'alert.success.item_created' => 'Položka úspěšně vytvořena',
'alert.success.item_updated' => 'Položka úspěšně aktualizována',
'alert.success.item_deleted' => 'Položka úspěšně smazána',
'alert.success.item_restored' => 'Položka úspěšně obnovena',
'alert.success.updating' => 'Aktualizuji seznam aplikací',
'alert.success.tag_created' => 'Tag úspěšně vytvořen',
'alert.success.tag_updated' => 'Tag úspěšně aktualizován',
'alert.success.tag_deleted' => 'Tag úspěšně smazán',
'alert.success.tag_restored' => 'Tag úspěšně obnoven',
'alert.success.setting_updated' => 'Úspěšně jste aktualizovali nastavení',
'alert.error.not_exist' => 'Tohle nastavení neexistuje.',
'alert.success.user_created' => 'Uživatel úspěšně vytovřen',
'alert.success.user_updated' => 'Uživatel úspěšně aktualizován',
'alert.success.user_deleted' => 'Uživatel úspěšně smazán',
'alert.success.user_restored' => 'Uživatel úspěšně obnoven',
'dashboard.reorder' => 'Změňte pořadí a připněte položky',
'dashboard.settings' => 'Nastavení',
);

Some files were not shown because too many files have changed in this diff Show More