mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-01-17 21:28:30 +01:00
commit
85aca18a8c
6
.github/workflows/analyze.yml
vendored
6
.github/workflows/analyze.yml
vendored
@ -15,10 +15,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
- name: Use Node.js 18.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Build all assets
|
||||
run: |
|
||||
@ -28,7 +28,7 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
php-version: 8.0
|
||||
coverage: pcov
|
||||
extensions: mbstring
|
||||
|
||||
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -6,16 +6,16 @@ on:
|
||||
jobs:
|
||||
|
||||
test-js:
|
||||
name: Test asset generation process on Node 16 LTS
|
||||
name: Test asset generation process on Node 18 LTS
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Use Node.js 16 LTS
|
||||
- name: Use Node.js 18 LTS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Try to build the assets
|
||||
run: |
|
||||
@ -42,7 +42,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ ubuntu-latest ]
|
||||
php-versions: [ '7.4', '8.0', '8.1' ]
|
||||
php-versions: [ '8.0', '8.1', '8.2' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,7 @@
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/mix-manifest.json
|
||||
/resources/lang/vendor
|
||||
/lang/vendor
|
||||
/storage/*.key
|
||||
/tests/Controller/logs
|
||||
/vendor
|
||||
|
@ -84,5 +84,5 @@ docker exec -it linkace-php composer run test
|
||||
The Base image for LinkAce contains several packages and PHP extensions needed by LinkAce. It shortens the build time of the release images. This step is not needed by any developer working on LinkAce and is just a documentation for maintainers.
|
||||
|
||||
```bash
|
||||
docker buildx build --push --platform "linux/amd64,linux/arm64,linux/arm/v7" -t linkace/base-image:php-8.1-alpine -f resources/docker/dockerfiles/release-base.Dockerfile .
|
||||
docker buildx build --push --platform "linux/amd64,linux/arm64,linux/arm/v7" -t linkace/base-image:php-8.2-alpine -f resources/docker/dockerfiles/release-base.Dockerfile .
|
||||
```
|
||||
|
19
SECURITY.md
19
SECURITY.md
@ -2,9 +2,18 @@
|
||||
|
||||
## Supported Versions
|
||||
|
||||
There is no warranty for the program, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the program "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
|
||||
There is no warranty for the program, to the extent permitted by applicable law. Except when otherwise stated in
|
||||
writing the copyright holders and/or other parties provide the program "as is" without warranty of any kind,
|
||||
either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for
|
||||
a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program
|
||||
prove defective, you assume the cost of all necessary servicing, repair or correction.
|
||||
|
||||
In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who modifies and/or conveys the program as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.
|
||||
In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who
|
||||
modifies and/or conveys the program as permitted above, be liable to you for damages, including any general, special,
|
||||
incidental or consequential damages arising out of the use or inability to use the program (including but not limited
|
||||
to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the
|
||||
program to operate with any other programs), even if such holder or other party has been advised of the possibility
|
||||
of such damages.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
@ -25,4 +34,8 @@ All dependencies are updated regularly, security fixes for those dependencies ar
|
||||
If you discover a security vulnerability, please contact me directly via `contact [at] linkace [dot] org`. Those
|
||||
vulnerabilities are addressed as fast as possible.
|
||||
|
||||
At the moment, there is no bug bounty program active.
|
||||
### Bug Bounties
|
||||
|
||||
The LinkAce project offers bug bounties for finding critical security vulnerabilities. Bounties are paid from the funds
|
||||
available in the [Open Collective account](https://opencollective.com/linkace). Please notice that the actual paid
|
||||
amounts are subject to negotiation and depend on the severity of the vulnerability.
|
||||
|
@ -12,20 +12,23 @@ use Shaarli\NetscapeBookmarkParser\NetscapeBookmarkParser;
|
||||
|
||||
class ImportHtmlBookmarks
|
||||
{
|
||||
protected $imported = 0;
|
||||
protected $skipped = 0;
|
||||
protected int $imported = 0;
|
||||
protected int $skipped = 0;
|
||||
|
||||
/**
|
||||
* Import all links from a given bookmarks file.
|
||||
*
|
||||
* @param string $data
|
||||
* @param string $userId
|
||||
* @param bool $generateMeta
|
||||
* @param bool $generateMeta
|
||||
* @return bool
|
||||
*/
|
||||
public function run(string $data, string $userId, bool $generateMeta = true): bool
|
||||
{
|
||||
$parser = new NetscapeBookmarkParser(true, [], '0', storage_path('logs'));
|
||||
$parser = new NetscapeBookmarkParser(
|
||||
defaultPub: usersettings('links_private_default'),
|
||||
logDir: storage_path('logs')
|
||||
);
|
||||
|
||||
try {
|
||||
$links = $parser->parseString($data);
|
||||
@ -55,6 +58,7 @@ class ImportHtmlBookmarks
|
||||
$description = $link['note'];
|
||||
}
|
||||
|
||||
Log::debug($link['uri'] .': '. $link['pub']);
|
||||
$newLink = new Link([
|
||||
'user_id' => $userId,
|
||||
'url' => $link['uri'],
|
||||
|
@ -17,7 +17,6 @@ class UpdateLinkThumbnails extends Command
|
||||
$this->confirm('This command updates the thumbnail for all links with the status "ok". This can take a long time, depending on the amount of links you have saved. Do you want to proceed?');
|
||||
|
||||
$totalCount = Link::where('status', Link::STATUS_OK)->count();
|
||||
$processedLinks = 0;
|
||||
|
||||
if ($totalCount === 0) {
|
||||
$this->warn('No links with status "ok" found. Aborting');
|
||||
@ -26,14 +25,11 @@ class UpdateLinkThumbnails extends Command
|
||||
$this->comment("Started processing of $totalCount links...");
|
||||
|
||||
Link::where('status', Link::STATUS_OK)->latest()
|
||||
->chunk(100, function ($links) use ($processedLinks, $totalCount) {
|
||||
foreach ($links as $link) {
|
||||
->chunk(100, function ($links) {
|
||||
$this->withProgressBar($links, function ($link) {
|
||||
$this->updateThumbnailForLink($link);
|
||||
sleep(1); // Rate limiting of outgoing traffic
|
||||
}
|
||||
|
||||
$processedLinks += count($links);
|
||||
$this->comment("Processed $processedLinks of $totalCount links.");
|
||||
});
|
||||
});
|
||||
|
||||
$this->info('Finished processing all links.');
|
||||
|
@ -4,7 +4,7 @@
|
||||
"license": "GPL-3.0-or-later",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.4 | ^8.0 | ^8.1",
|
||||
"php": "^8.0.2 | ^8.1 | ^8.2",
|
||||
"composer/semver": "^1.5",
|
||||
"doctrine/dbal": "^2.10.2",
|
||||
"fideloper/proxy": "^4.4",
|
||||
@ -13,25 +13,29 @@
|
||||
"kovah/laravel-html-meta": "^2.0",
|
||||
"laracasts/flash": "^3.1",
|
||||
"laravel/fortify": "^1.7",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/framework": "^9.0",
|
||||
"league/csv": "^9.6",
|
||||
"league/flysystem-aws-s3-v3": "^1.0",
|
||||
"league/flysystem-aws-s3-v3": "^3.0",
|
||||
"league/flysystem-ftp": "^3.0",
|
||||
"league/flysystem-sftp-v3": "^3.0",
|
||||
"predis/predis": "^1.1",
|
||||
"rap2hpoutre/laravel-log-viewer": "^1.7",
|
||||
"rap2hpoutre/laravel-log-viewer": "^v2.2.0",
|
||||
"sentry/sentry-laravel": "^2.3",
|
||||
"shaarli/netscape-bookmark-parser": "^2.1",
|
||||
"spatie/laravel-backup": "^6.11.1",
|
||||
"spatie/laravel-backup": "^8.1.5",
|
||||
"symfony/http-client": "^6.0",
|
||||
"symfony/mailgun-mailer": "^6.0",
|
||||
"symfony/postmark-mailer": "^6.0",
|
||||
"venturecraft/revisionable": "^1.34"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.2",
|
||||
"barryvdh/laravel-ide-helper": "^2.6",
|
||||
"enlightn/enlightn": "^1.1",
|
||||
"facade/ignition": "^2.3.6",
|
||||
"spatie/laravel-ignition": "^1.6",
|
||||
"fakerphp/faker": "^1.12",
|
||||
"laravel/tinker": "^2.2.0",
|
||||
"mockery/mockery": "1.3.*",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
|
3909
composer.lock
generated
3909
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -92,7 +92,9 @@ return [
|
||||
'es_ES' => 'Español',
|
||||
'fr_FR' => 'Français',
|
||||
'hu_HU' => 'Magyar',
|
||||
'it_IT' => 'Italiano',
|
||||
'no_NO' => 'Norsk',
|
||||
'pl_PL' => 'Polski',
|
||||
'vi_VN' => 'Tiếng Việt',
|
||||
'zh_CN' => '简体中文',
|
||||
],
|
||||
|
@ -149,17 +149,17 @@ return [
|
||||
* For Slack you need to install laravel/slack-notification-channel.
|
||||
*
|
||||
* You can also use your own notification classes, just make sure the class is named after one of
|
||||
* the `Spatie\Backup\Events` classes.
|
||||
* the `Spatie\Backup\Notifications\Notifications` classes.
|
||||
*/
|
||||
'notifications' => [
|
||||
|
||||
'notifications' => [
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailedNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFoundNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailedNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFoundNotification::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessfulNotification::class => ['mail'],
|
||||
],
|
||||
|
||||
/*
|
||||
@ -190,6 +190,20 @@ return [
|
||||
'icon' => null,
|
||||
|
||||
],
|
||||
|
||||
'discord' => [
|
||||
'webhook_url' => '',
|
||||
|
||||
/*
|
||||
* If this is an empty string, the name field on the webhook will be used.
|
||||
*/
|
||||
'username' => '',
|
||||
|
||||
/*
|
||||
* If this is an empty string, the avatar on the webhook will be used.
|
||||
*/
|
||||
'avatar_url' => '',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -74,7 +74,7 @@ return [
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'schema' => 'public',
|
||||
'search_path' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
'sqlsrv' => [
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user