Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ LOG_LEVEL=info

EVENTBRITE_OAUTH2_PERSONAL_TOKEN=

RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=
TURNSTILE_SECRET_KEY=
TURNSTILE_SITE_KEY=

BANNING_ENABLE=
SUPPORT_EMAIL=
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.20.2
20.20.2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM php:8.3-fpm

ARG DEBIAN_FRONTEND=noninteractive
ARG NVM_VERSION="v0.40.3"
ENV NODE_VERSION="18.20.4"
ENV NODE_VERSION="20.20.2"
ARG YARN_VERSION="1.22.22"
ARG GITHUB_OAUTH_TOKEN
ARG XDEBUG_VERSION="xdebug-3.3.2"
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/EmailVerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/
use App\Http\Controllers\Controller;
use App\libs\Utils\EmailUtils;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\Services\Auth\IUserService;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
Expand Down Expand Up @@ -87,7 +88,7 @@ protected function validator(array $data)
{
return Validator::make($data, [
'email' => 'required|string|email|max:255',
'g-recaptcha-response' => 'required|recaptcha',
'cf-turnstile-response' => ['required', new Turnstile()],
]);
}

Expand All @@ -100,7 +101,6 @@ public function resend(LaravelRequest $request)
if (!$validator->passes()) {
return Redirect::action('Auth\EmailVerificationController@showVerificationForm')->withErrors($validator);
}

$user = $this->user_service->resendVerificationEmail($payload);

return view("auth.email_verification_resend_success", ['user' => $user]);
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/

use App\Http\Controllers\Controller;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\libs\Utils\EmailUtils;
use App\Services\Auth\IUserService;
use Illuminate\Support\Facades\Log;
Expand Down Expand Up @@ -162,6 +163,7 @@ protected function validator(array $data)
{
return Validator::make($data, [
'email' => 'required|string|email|max:255',
'cf-turnstile-response' => ['required', new Turnstile()],
]);
}

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Auth/PasswordSetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/

use App\Http\Controllers\Controller;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\Http\Utils\CountryList;
use App\libs\Auth\Repositories\IUserRegistrationRequestRepository;
use App\Services\Auth\IUserService;
Expand Down Expand Up @@ -155,7 +156,7 @@ protected function validator(array $data)
'company' => 'sometimes|string|max:100',
'country_iso_code' => 'required|string|country_iso_alpha2_code',
'password' => 'required|string|confirmed|password_policy',
'g-recaptcha-response' => 'required|recaptcha',
'cf-turnstile-response' => ['required', new Turnstile()],
]);
}

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/
use App\Http\Controllers\Controller;
use App\Http\Utils\CountryList;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\Services\Auth\IUserService;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
Expand Down Expand Up @@ -177,7 +178,7 @@ protected function validator(array $data)
'country_iso_code' => 'required|string|country_iso_alpha2_code',
'email' => 'required|string|email|max:255',
'password' => 'required|string|confirmed|password_policy',
'g-recaptcha-response' => 'required|recaptcha',
'cf-turnstile-response' => ['required', new Turnstile()],
];

if(!empty(Config::get("app.code_of_conduct_link", null))){
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/
use App\Http\Controllers\Controller;
use App\libs\Auth\Repositories\IUserPasswordResetRequestRepository;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\Services\Auth\IUserService;
use Auth\Exceptions\UserPasswordResetRequestVoidException;
use Illuminate\Support\Facades\Log;
Expand Down Expand Up @@ -113,7 +114,7 @@ protected function validator(array $data)
return Validator::make($data, [
'token' => 'required',
'password' => 'required|string|confirmed|password_policy',
'g-recaptcha-response' => 'required|recaptcha',
'cf-turnstile-response' => ['required', new Turnstile()],
]);
}

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/

use App\Http\Controllers\OpenId\DiscoveryController;
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
use App\Jobs\RevokeUserGrantsOnExplicitLogout;
use App\Http\Controllers\OpenId\OpenIdController;
use App\Http\Controllers\Traits\JsonResponses;
Expand Down Expand Up @@ -420,7 +421,7 @@ public function postLogin()
];

if ($login_attempts >= $max_login_attempts_2_show_captcha) {
$rules['g-recaptcha-response'] = 'required|recaptcha';
$rules['cf-turnstile-response'] = ['required', new Turnstile()];
}
// Create a new validator instance.
$validator = Validator::make($data, $rules);
Expand Down
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
],
"license": "MIT",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/smarcet/recaptcha"
}
],
"require": {
"php": "^8.3",
"ext-json": "*",
Expand All @@ -29,7 +23,6 @@
"firebase/php-jwt": "6.11.1",
"get-stream/stream-chat": "^3.10.0",
"glenscott/url-normalizer": "1.4.0",
"greggilbert/recaptcha": "dev-master",
"guzzlehttp/guzzle": "7.9.3",
"guzzlehttp/uri-template": "^1.0",
"ircmaxell/random-lib": "1.2.0",
Expand All @@ -49,6 +42,7 @@
"php-opencloud/openstack": "3.10.0",
"phpseclib/phpseclib": "^3.0.43",
"predis/predis": "v2.2.2",
"ryangjchandler/laravel-cloudflare-turnstile": "^3.0",
"s-ichikawa/laravel-sendgrid-driver": "^4.0",
"smarcet/jose4php": "2.0.0",
"socialiteproviders/apple": "^5.6.1",
Expand Down
136 changes: 76 additions & 60 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
OAuth2\OAuth2ServiceProvider::class,
OpenId\OpenIdServiceProvider::class,
\Providers\OAuth2\ClientAuthContextValidatorFactoryProvider::class,
Greggilbert\Recaptcha\RecaptchaServiceProvider::class,
Sichikawa\LaravelSendgridDriver\SendgridTransportServiceProvider::class,
// Doctrine ORM
LaravelDoctrine\ORM\DoctrineServiceProvider::class,
Expand Down Expand Up @@ -220,7 +219,6 @@
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Recaptcha' => Kuttumiah\Recaptcha\Facades\Recaptcha::class,
'ServerConfigurationService' => \Services\Facades\ServerConfigurationService::class,
'ExternalUrlService' => \Services\Facades\ExternalUrlService::class,
// Doctrine ORM Facades
Expand Down
Loading
Loading