mirror of
https://github.com/cydrobolt/polr.git
synced 2024-09-19 15:11:40 +02:00
Merge branch 'master' into feature/recaptcha_login
This commit is contained in:
commit
81507c574c
@ -16,7 +16,7 @@ CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=file
|
||||
|
||||
VERSION=2.2.0
|
||||
VERSION_RELMONTH=May
|
||||
VERSION_RELDAY=6
|
||||
VERSION_RELYEAR=2017
|
||||
VERSION=2.3.0
|
||||
VERSION_RELMONTH=Jan
|
||||
VERSION_RELDAY=28
|
||||
VERSION_RELYEAR=2020
|
||||
|
@ -3,6 +3,7 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Redirect;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use App\Helpers\CryptoHelper;
|
||||
use App\Models\User;
|
||||
@ -220,8 +221,8 @@ class SetupController extends Controller {
|
||||
}
|
||||
|
||||
public static function finishSetup(Request $request) {
|
||||
// get data from cookie, decode JSON
|
||||
if (!isset($_COOKIE['setup_arguments'])) {
|
||||
// Abort if setup arguments are missing.
|
||||
abort(404);
|
||||
}
|
||||
|
||||
@ -231,12 +232,19 @@ class SetupController extends Controller {
|
||||
// unset cookie
|
||||
setcookie('setup_arguments', '', time()-3600);
|
||||
|
||||
$transaction_authorised = env('TMP_SETUP_AUTH_KEY') == $setup_finish_args->setup_auth_key;
|
||||
$transaction_authorised = env('TMP_SETUP_AUTH_KEY') === $setup_finish_args->setup_auth_key;
|
||||
|
||||
if ($transaction_authorised != true) {
|
||||
abort(403, 'Transaction unauthorised.');
|
||||
}
|
||||
|
||||
$usersTableExists = Schema::hasTable('users');
|
||||
|
||||
if ($usersTableExists) {
|
||||
// If the users table exists, then the setup process may have already been completed before.
|
||||
abort(403, 'Setup has been completed already.');
|
||||
}
|
||||
|
||||
$database_created = self::createDatabase();
|
||||
if (!$database_created) {
|
||||
return redirect(route('setup'))->with('error', 'Could not create database. Perhaps your credentials were incorrect?');
|
||||
|
@ -14,7 +14,7 @@
|
||||
"torann/geoip": "^1.0",
|
||||
"geoip2/geoip2": "^2.4",
|
||||
"nesbot/carbon": "^1.22",
|
||||
"doctrine/dbal": "^2.5",
|
||||
"doctrine/dbal": "2.5.11",
|
||||
"google/recaptcha": "~1.1",
|
||||
"symfony/http-foundation": "2.7.51"
|
||||
},
|
||||
|
724
composer.lock
generated
724
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user