mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
commit
2584b8b093
15 changed files with 8 additions and 134 deletions
|
@ -42,7 +42,6 @@ API_BASE="/api/1/"
|
||||||
API_SEARCH="/api/search"
|
API_SEARCH="/api/search"
|
||||||
|
|
||||||
OPEN_REGISTRATION=true
|
OPEN_REGISTRATION=true
|
||||||
RECAPTCHA_ENABLED=false
|
|
||||||
ENFORCE_EMAIL_VERIFICATION=true
|
ENFORCE_EMAIL_VERIFICATION=true
|
||||||
|
|
||||||
MAX_PHOTO_SIZE=15000
|
MAX_PHOTO_SIZE=15000
|
||||||
|
|
|
@ -41,7 +41,6 @@ API_BASE="/api/1/"
|
||||||
API_SEARCH="/api/search"
|
API_SEARCH="/api/search"
|
||||||
|
|
||||||
OPEN_REGISTRATION=false
|
OPEN_REGISTRATION=false
|
||||||
RECAPTCHA_ENABLED=false
|
|
||||||
ENFORCE_EMAIL_VERIFICATION=true
|
ENFORCE_EMAIL_VERIFICATION=true
|
||||||
|
|
||||||
MAX_PHOTO_SIZE=15000
|
MAX_PHOTO_SIZE=15000
|
||||||
|
|
|
@ -53,10 +53,6 @@ class LoginController extends Controller
|
||||||
'password' => 'required|string|min:6',
|
'password' => 'required|string|min:6',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (config('pixelfed.recaptcha')) {
|
|
||||||
$rules['g-recaptcha-response'] = 'required|recaptcha';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->validate($request, $rules);
|
$this->validate($request, $rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,6 @@ class RegisterController extends Controller
|
||||||
'password' => 'required|string|min:6|confirmed',
|
'password' => 'required|string|min:6|confirmed',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (config('pixelfed.recaptcha')) {
|
|
||||||
$rules['g-recaptcha-response'] = 'required|recaptcha';
|
|
||||||
}
|
|
||||||
|
|
||||||
return Validator::make($data, $rules);
|
return Validator::make($data, $rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,6 @@ class FederationController extends Controller
|
||||||
'homepage' => 'https://pixelfed.org',
|
'homepage' => 'https://pixelfed.org',
|
||||||
'repo' => 'https://github.com/pixelfed/pixelfed',
|
'repo' => 'https://github.com/pixelfed/pixelfed',
|
||||||
],
|
],
|
||||||
'captcha' => (bool) config('pixelfed.recaptcha'),
|
|
||||||
],
|
],
|
||||||
'protocols' => [
|
'protocols' => [
|
||||||
'activitypub',
|
'activitypub',
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
"beyondcode/laravel-self-diagnosis": "^1.0.2",
|
"beyondcode/laravel-self-diagnosis": "^1.0.2",
|
||||||
"doctrine/dbal": "^2.7",
|
"doctrine/dbal": "^2.7",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
"greggilbert/recaptcha": "dev-master",
|
|
||||||
"intervention/image": "^2.4",
|
"intervention/image": "^2.4",
|
||||||
"jenssegers/agent": "^2.6",
|
"jenssegers/agent": "^2.6",
|
||||||
"laravel/framework": "5.8.*",
|
"laravel/framework": "5.8.*",
|
||||||
|
|
|
@ -150,7 +150,6 @@ return [
|
||||||
/*
|
/*
|
||||||
* Package Service Providers...
|
* Package Service Providers...
|
||||||
*/
|
*/
|
||||||
Greggilbert\Recaptcha\RecaptchaServiceProvider::class,
|
|
||||||
Jackiedo\DotenvEditor\DotenvEditorServiceProvider::class,
|
Jackiedo\DotenvEditor\DotenvEditorServiceProvider::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -211,7 +210,6 @@ return [
|
||||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
'View' => Illuminate\Support\Facades\View::class,
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|
||||||
'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class,
|
|
||||||
'DotenvEditor' => Jackiedo\DotenvEditor\Facades\DotenvEditor::class,
|
'DotenvEditor' => Jackiedo\DotenvEditor\Facades\DotenvEditor::class,
|
||||||
'PrettyNumber' => App\Util\Lexer\PrettyNumber::class,
|
'PrettyNumber' => App\Util\Lexer\PrettyNumber::class,
|
||||||
'Purify' => Stevebauman\Purify\Facades\Purify::class,
|
'Purify' => Stevebauman\Purify\Facades\Purify::class,
|
||||||
|
|
|
@ -74,15 +74,15 @@ return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Enable Google Recaptcha v2
|
| ActivityPub
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Enable/disable recaptcha on login/registration forms. API Keys required.
|
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
'recaptcha' => env('RECAPTCHA_ENABLED', false),
|
'ap_inbox' => env('ACTIVITYPUB_INBOX', false),
|
||||||
|
'ap_shared' => env('ACTIVITYPUB_SHAREDINBOX', false),
|
||||||
|
'ap_delivery_timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 2.0),
|
||||||
|
'ap_delivery_concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10),
|
||||||
|
|
||||||
'remote_follow_enabled' => env('REMOTE_FOLLOW', false),
|
'remote_follow_enabled' => env('REMOTE_FOLLOW', false),
|
||||||
'activitypub_enabled' => env('ACTIVITY_PUB', false),
|
'activitypub_enabled' => env('ACTIVITY_PUB', false),
|
||||||
|
|
||||||
|
@ -262,11 +262,6 @@ return [
|
||||||
|
|
||||||
'enforce_account_limit' => env('LIMIT_ACCOUNT_SIZE', true),
|
'enforce_account_limit' => env('LIMIT_ACCOUNT_SIZE', true),
|
||||||
|
|
||||||
'ap_inbox' => env('ACTIVITYPUB_INBOX', false),
|
|
||||||
'ap_shared' => env('ACTIVITYPUB_SHAREDINBOX', false),
|
|
||||||
'ap_delivery_timeout' => env('ACTIVITYPUB_DELIVERY_TIMEOUT', 2.0),
|
|
||||||
'ap_delivery_concurrency' => env('ACTIVITYPUB_DELIVERY_CONCURRENCY', 10),
|
|
||||||
|
|
||||||
'import' => [
|
'import' => [
|
||||||
'instagram' => [
|
'instagram' => [
|
||||||
'enabled' => false,
|
'enabled' => false,
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| API Keys
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Set the public and private API keys as provided by reCAPTCHA.
|
|
||||||
|
|
|
||||||
| In version 2 of reCAPTCHA, public_key is the Site key,
|
|
||||||
| and private_key is the Secret key.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'public_key' => env('RECAPTCHA_PUBLIC_KEY', ''),
|
|
||||||
'private_key' => env('RECAPTCHA_PRIVATE_KEY', ''),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Template
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Set a template to use if you don't want to use the standard one.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'template' => '',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Driver
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Determine how to call out to get response; values are 'curl' or 'native'.
|
|
||||||
| Only applies to v2.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'driver' => 'curl',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Options
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Various options for the driver
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'options' => [
|
|
||||||
|
|
||||||
'curl_timeout' => 1,
|
|
||||||
'curl_verify' => true,
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Version
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Set which version of ReCaptcha to use.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'version' => 2,
|
|
||||||
|
|
||||||
];
|
|
|
@ -24,18 +24,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
|
||||||
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">Recaptcha</label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<div class="form-check pb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" id="recaptcha" name="recaptcha" {{config('pixelfed.recaptcha') === true ? 'checked=""' : '' }}>
|
|
||||||
<label class="form-check-label font-weight-bold" for="open_registration">
|
|
||||||
{{config('pixelfed.recaptcha') == true ? 'Enabled' : 'Disabled' }}
|
|
||||||
</label>
|
|
||||||
<p class="text-muted small help-text font-weight-bold">When this option is enabled, new user registration is open.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">ActivityPub</label>
|
<label for="app_url" class="col-sm-3 col-form-label font-weight-bold text-right">ActivityPub</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -100,4 +88,4 @@
|
||||||
<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
|
<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -26,12 +26,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(config('pixelfed.recaptcha'))
|
|
||||||
<div class="row my-3">
|
|
||||||
{!! Recaptcha::render() !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="form-group row mb-0">
|
<div class="form-group row mb-0">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button type="submit" class="btn btn-success btn-block font-weight-bold">
|
<button type="submit" class="btn btn-success btn-block font-weight-bold">
|
||||||
|
|
|
@ -47,12 +47,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(config('pixelfed.recaptcha'))
|
|
||||||
<div class="row my-3">
|
|
||||||
{!! Recaptcha::render() !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="form-group row mb-0">
|
<div class="form-group row mb-0">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button type="submit" class="btn btn-primary btn-block py-0 font-weight-bold">
|
<button type="submit" class="btn btn-primary btn-block py-0 font-weight-bold">
|
||||||
|
|
|
@ -74,12 +74,6 @@
|
||||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="{{ __('Confirm Password') }}" required>
|
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="{{ __('Confirm Password') }}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(config('pixelfed.recaptcha'))
|
|
||||||
<div class="row my-3">
|
|
||||||
{!! Recaptcha::render() !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
|
@ -26,12 +26,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(config('pixelfed.recaptcha'))
|
|
||||||
<div class="row my-3">
|
|
||||||
{!! Recaptcha::render() !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="form-group row mb-0">
|
<div class="form-group row mb-0">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button type="submit" class="btn btn-success btn-block font-weight-bold">
|
<button type="submit" class="btn btn-success btn-block font-weight-bold">
|
||||||
|
|
|
@ -140,11 +140,6 @@
|
||||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="{{ __('Confirm Password') }}" required>
|
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="{{ __('Confirm Password') }}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if(config('pixelfed.recaptcha'))
|
|
||||||
<div class="row my-3">
|
|
||||||
{!! Recaptcha::render() !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button type="submit" class="btn btn-primary btn-block py-0 font-weight-bold">
|
<button type="submit" class="btn btn-primary btn-block py-0 font-weight-bold">
|
||||||
|
@ -189,4 +184,4 @@
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue