mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23:16 +00:00
commit
7f70eecf28
4 changed files with 704 additions and 669 deletions
|
@ -27,7 +27,7 @@
|
||||||
"league/flysystem-aws-s3-v3": "~1.0",
|
"league/flysystem-aws-s3-v3": "~1.0",
|
||||||
"league/flysystem-cached-adapter": "~1.0",
|
"league/flysystem-cached-adapter": "~1.0",
|
||||||
"league/iso3166": "^2.1",
|
"league/iso3166": "^2.1",
|
||||||
"moontoast/math": "^1.1",
|
"brick/math": "^0.8",
|
||||||
"pbmedia/laravel-ffmpeg": "5.0.*",
|
"pbmedia/laravel-ffmpeg": "5.0.*",
|
||||||
"phpseclib/phpseclib": "~2.0",
|
"phpseclib/phpseclib": "~2.0",
|
||||||
"pixelfed/bacon-qr-code": "^3.0",
|
"pixelfed/bacon-qr-code": "^3.0",
|
||||||
|
|
1345
composer.lock
generated
1345
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'enabled' => env('PF_COSTAR_ENABLED', false),
|
'enabled' => false,
|
||||||
|
|
||||||
'domain' => [
|
'domain' => [
|
||||||
'block' => env('CS_BLOCKED_DOMAINS', null) ? explode(',', env('CS_BLOCKED_DOMAINS')) : null,
|
'block' => env('CS_BLOCKED_DOMAINS', null) ? explode(',', env('CS_BLOCKED_DOMAINS')) : null,
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Tests\Unit;
|
|
||||||
|
|
||||||
use App\Util\ActivityPub\Helpers;
|
|
||||||
use Tests\TestCase;
|
|
||||||
use Illuminate\Foundation\Testing\WithFaker;
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
||||||
|
|
||||||
class CostarTest extends TestCase
|
|
||||||
{
|
|
||||||
/** @test */
|
|
||||||
public function blockedDomain()
|
|
||||||
{
|
|
||||||
$domains = config('costar.domain.block');
|
|
||||||
$this->assertTrue(in_array('example.net', $domains));
|
|
||||||
|
|
||||||
$blockedDomain = 'https://example.org/user/replyGuy';
|
|
||||||
$this->assertFalse(Helpers::validateUrl($blockedDomain));
|
|
||||||
|
|
||||||
$unblockedDomain = 'https://pixelfed.org/user/pixelfed';
|
|
||||||
$this->assertEquals(Helpers::validateUrl($unblockedDomain), $unblockedDomain);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue