Merge pull request #148 from Poniverse/shift-40779

This commit is contained in:
Adam Lavin 2021-02-14 18:54:59 +00:00 committed by GitHub
commit 8a6be4ea47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1656 additions and 887 deletions

View file

@ -25,7 +25,6 @@ use App\Models\User;
use Auth;
use Carbon\Carbon;
use DB;
use Illuminate\Support\Facades\Input;
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use League\OAuth2\Client\Token\AccessToken;
use Log;
@ -132,8 +131,8 @@ class AuthController extends Controller
*/
public function postPoniverseAccountSync()
{
$poniverseId = Input::get('id');
$updatedAttribute = Input::get('attribute');
$poniverseId = Request::get('id');
$updatedAttribute = Request::get('attribute');
// Only email address updates are supported at this time.
if ('email' !== $updatedAttribute) {

View file

@ -30,7 +30,11 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
protected $middlewareGroups = [
@ -39,8 +43,8 @@ class Kernel extends HttpKernel
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\DisabledAccountCheck::class,
],
];
@ -52,14 +56,18 @@ class Kernel extends HttpKernel
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'auth.oauth' => \App\Http\Middleware\AuthenticateOAuth::class,
'can' => \App\Http\Middleware\Authorize::class,
'json-exceptions' => \App\Http\Middleware\JsonExceptions::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'cors' => \Barryvdh\Cors\HandleCors::class,
'auth.oauth' => \App\Http\Middleware\AuthenticateOAuth::class,
'json-exceptions' => \App\Http\Middleware\JsonExceptions::class,
];
/**
* The priority-sorted list of middleware.
@ -72,6 +80,7 @@ class Kernel extends HttpKernel
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,

View file

@ -20,8 +20,8 @@
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Auth\AuthManager;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
@ -37,7 +37,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
return redirect(RouteServiceProvider::HOME);
}
return $next($request);

View file

@ -0,0 +1,18 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}

View file

@ -36,6 +36,13 @@ class RouteServiceProvider extends ServiceProvider
*/
protected $namespace = 'App\Http\Controllers';
/**
* The path to the "home" route for your application.
*
* @var string
*/
public const HOME = '/home';
/**
* Define your route model bindings, pattern filters, etc.
*

View file

@ -10,41 +10,40 @@
"license": "AGPL",
"type": "project",
"require": {
"php": "^7.1.3",
"laravel/framework": "5.8.*",
"php": "^7.2|^8.0",
"laravel/framework": "^6.20",
"codescale/ffmpeg-php": "2.7.0",
"barryvdh/laravel-ide-helper": "v2.8.0",
"barryvdh/laravel-ide-helper": "^2.8",
"guzzlehttp/guzzle": "~6.0",
"doctrine/dbal": "2.5.*",
"doctrine/dbal": "^2.12",
"venturecraft/revisionable": "^1.36",
"pda/pheanstalk": "~v4.0.0",
"cviebrock/laravel-elasticsearch": "4.0.0",
"barryvdh/laravel-debugbar": "~3.4",
"predis/predis": "^1.0",
"pda/pheanstalk": "^4.0",
"cviebrock/laravel-elasticsearch": "^4.0",
"barryvdh/laravel-debugbar": "^3.5",
"predis/predis": "^1.1",
"ksubileau/color-thief-php": "^1.3",
"graham-campbell/exceptions": "^12.0",
"minishlink/web-push": "^1.0",
"alsofronie/eloquent-uuid": "^1.0",
"poniverse/api": "dev-rewrite",
"fruitcake/laravel-cors": "2.0.1",
"laravel/tinker": "^1.0",
"doctrine/collections": "v1.4.*",
"doctrine/annotations": "v1.4.*",
"doctrine/cache": "v1.6.*",
"doctrine/instantiator": "^1.1",
"fideloper/proxy": "^4.0"
"laravel/tinker": "^2.5",
"doctrine/collections": "^1.6",
"doctrine/annotations": "^1.11",
"doctrine/cache": "^1.8",
"doctrine/instantiator": "^1.4",
"fideloper/proxy": "^4.4"
},
"require-dev": {
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.5",
"filp/whoops": "^2.0",
"symfony/dom-crawler": "~3.1",
"symfony/css-selector": "~3.1",
"laravel/browser-kit-testing": "2.*",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"symfony/dom-crawler": "^4.2",
"symfony/css-selector": "^4.2",
"laravel/browser-kit-testing": "^5.2",
"nategood/httpful": "^0.2.20",
"nunomaduro/collision": "^3.0",
"beyondcode/laravel-dump-server": "^1.0"
"fakerphp/faker": "^1.9.1",
"facade/ignition": "^1.16.4"
},
"autoload": {
"classmap": [

2381
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -44,6 +44,7 @@ return [
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
@ -96,7 +97,21 @@ return [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];

View file

@ -37,7 +37,7 @@ return [
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'useTLS' => true,
],
],

View file

@ -119,10 +119,10 @@ return [
'redis' => [
'client' => env('REDIS_CLIENT', 'predis'),
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'predis'),
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
@ -130,16 +130,16 @@ return [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],

View file

@ -37,7 +37,7 @@ return [
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
@ -67,6 +67,7 @@ return [
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
],
],

View file

@ -1,5 +1,6 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
@ -36,7 +37,7 @@ return [
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'channels' => ['single'],
'ignore_exceptions' => false,
],
@ -89,6 +90,15 @@ return [
'driver' => 'errorlog',
'level' => 'debug',
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

View file

@ -11,8 +11,8 @@ return [
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "postmark", "log", "array"
| Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array"
|
*/

View file

@ -80,6 +80,7 @@ return [
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],

View file

@ -8,7 +8,7 @@ return [
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, SparkPost and others. This file provides a sane default
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
@ -30,8 +30,4 @@ return [
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
];

View file

@ -4,7 +4,7 @@ return [
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
@ -13,10 +13,10 @@ return [
|
*/
'password' => 'Passwords must be at least six characters and match the confirmation.',
'user' => "We can't find a user with that e-mail address.",
'token' => 'This password reset token is invalid.',
'sent' => 'We have e-mailed your password reset link!',
'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.",
];

View file

@ -40,7 +40,7 @@ return [
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
@ -93,6 +93,7 @@ return [
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => 'The password is incorrect.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
@ -109,7 +110,7 @@ return [
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'starts_with' => 'The :attribute must start with one of the following: :values',
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',