Merge pull request #2125 from pixelfed/staging

Staging
This commit is contained in:
daniel 2020-04-19 13:23:59 -06:00 committed by GitHub
commit 7f70eecf28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 704 additions and 669 deletions

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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,

View file

@ -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);
}
}