diff --git a/app/Http/Controllers/Auth/AbstractLoginController.php b/app/Http/Controllers/Auth/AbstractLoginController.php index f36a8c231..8d0fb6ad6 100644 --- a/app/Http/Controllers/Auth/AbstractLoginController.php +++ b/app/Http/Controllers/Auth/AbstractLoginController.php @@ -107,7 +107,7 @@ abstract class AbstractLoginController extends Controller ]); if ($request->route()->named('auth.checkpoint')) { - throw new DisplayException(trans('auth.checkpoint_failed')); + throw new DisplayException(trans('auth.two_factor.checkpoint_failed')); } throw new DisplayException(trans('auth.failed')); diff --git a/app/Http/Controllers/Auth/LoginCheckpointController.php b/app/Http/Controllers/Auth/LoginCheckpointController.php index be6357516..2f5d0a28f 100644 --- a/app/Http/Controllers/Auth/LoginCheckpointController.php +++ b/app/Http/Controllers/Auth/LoginCheckpointController.php @@ -18,7 +18,7 @@ class LoginCheckpointController extends AbstractLoginController * * @throws \Pterodactyl\Exceptions\DisplayException */ - public function index(LoginCheckpointRequest $request): JsonResponse + public function __invoke(LoginCheckpointRequest $request): JsonResponse { try { $cache = $this->cache->pull($request->input('confirmation_token'), []); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 91c49e481..522a994f6 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -22,6 +22,8 @@ class LoginController extends AbstractLoginController $username = $request->input('user'); $useColumn = $this->getField($username); + sleep(1); + if ($this->hasTooManyLoginAttempts($request)) { $this->fireLockoutEvent($request); $this->sendLockoutResponse($request); diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 226958416..468a7f6d6 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -2,8 +2,12 @@ namespace Pterodactyl\Http\Controllers\Auth; +use Illuminate\Http\JsonResponse; +use Illuminate\Support\Facades\Password; +use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Http\Controllers\Controller; use Illuminate\Foundation\Auth\ResetsPasswords; +use Pterodactyl\Http\Requests\Auth\ResetPasswordRequest; class ResetPasswordController extends Controller { @@ -17,16 +21,44 @@ class ResetPasswordController extends Controller public $redirectTo = '/'; /** - * Return the rules used when validating password reset. + * Reset the given user's password. * - * @return array + * @param \Pterodactyl\Http\Requests\Auth\ResetPasswordRequest $request + * @return \Illuminate\Http\JsonResponse + * + * @throws \Pterodactyl\Exceptions\DisplayException */ - protected function rules(): array + public function __invoke(ResetPasswordRequest $request): JsonResponse { - return [ - 'token' => 'required', - 'email' => 'required|email', - 'password' => 'required|confirmed|min:8', - ]; + // Here we will attempt to reset the user's password. If it is successful we + // will update the password on an actual user model and persist it to the + // database. Otherwise we will parse the error and return the response. + $response = $this->broker()->reset( + $this->credentials($request), function ($user, $password) { + $this->resetPassword($user, $password); + } + ); + + // If the password was successfully reset, we will redirect the user back to + // the application's home authenticated view. If there is an error we can + // redirect them back to where they came from with their error message. + if ($response === Password::PASSWORD_RESET) { + return $this->sendResetResponse(); + } + + throw new DisplayException(trans($response)); + } + + /** + * Send a successful password reset response back to the callee. + * + * @return \Illuminate\Http\JsonResponse + */ + protected function sendResetResponse(): JsonResponse + { + return response()->json([ + 'success' => true, + 'redirect_to' => $this->redirectTo, + ]); } } diff --git a/app/Http/Requests/Auth/ResetPasswordRequest.php b/app/Http/Requests/Auth/ResetPasswordRequest.php new file mode 100644 index 000000000..e06883c2a --- /dev/null +++ b/app/Http/Requests/Auth/ResetPasswordRequest.php @@ -0,0 +1,28 @@ + 'required|string', + 'email' => 'required|email', + 'password' => 'required|string|confirmed|min:8', + ]; + } +} diff --git a/gulpfile.js b/gulpfile.js index c92ee3c6e..2f3226ed3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -23,6 +23,7 @@ const paths = { }, scripts: { src: './resources/assets/pterodactyl/scripts/**/*.{js,vue}', + watch: ['./resources/assets/pterodactyl/scripts/**/*.{js,vue}', './resources/lang/locales.js'], dest: './public/assets/scripts', }, }; @@ -68,7 +69,7 @@ function watch() { return del(['./public/assets/css/**/*.css']); }, styles)); - gulp.watch(paths.scripts.src, gulp.series(function cleanScripts() { + gulp.watch(paths.scripts.watch, gulp.series(function cleanScripts() { return del(['./public/assets/scripts/**/*.js']); }, scripts)); } diff --git a/resources/assets/pterodactyl/scripts/app.js b/resources/assets/pterodactyl/scripts/app.js index 0971fcf7b..b2e62753e 100644 --- a/resources/assets/pterodactyl/scripts/app.js +++ b/resources/assets/pterodactyl/scripts/app.js @@ -11,6 +11,7 @@ import Locales from './../../../../resources/lang/locales'; // Base Vuejs Templates import Login from './components/auth/Login'; +import ResetPassword from './components/auth/ResetPassword'; // Used for the route() helper. window.Ziggy = Ziggy; @@ -58,6 +59,17 @@ const router = new VueRouter({ path: '/checkpoint', component: Login, }, + { + name: 'reset-password', + path: '/reset-password/:token', + component: ResetPassword, + props: function (route) { + return { + token: route.params.token, + email: route.query.email || '', + } + }, + } ] }); diff --git a/resources/assets/pterodactyl/scripts/components/auth/ForgotPassword.vue b/resources/assets/pterodactyl/scripts/components/auth/ForgotPassword.vue index 71b058dd8..22d00c843 100644 --- a/resources/assets/pterodactyl/scripts/components/auth/ForgotPassword.vue +++ b/resources/assets/pterodactyl/scripts/components/auth/ForgotPassword.vue @@ -13,19 +13,20 @@
-

{{ $t('auth.reset_help_text') }}

+

{{ $t('auth.forgot_password.label_help') }}

@@ -67,7 +68,7 @@ this.$data.showSpinner = true; this.$data.errors = []; - window.axios.post(this.route('auth.forgot-password.send-link'), { + window.axios.post(this.route('auth.forgot-password'), { email: this.$props.email, }) .then(function (response) { diff --git a/resources/assets/pterodactyl/scripts/components/auth/Login.vue b/resources/assets/pterodactyl/scripts/components/auth/Login.vue index c10c37a8e..c027841e3 100644 --- a/resources/assets/pterodactyl/scripts/components/auth/Login.vue +++ b/resources/assets/pterodactyl/scripts/components/auth/Login.vue @@ -10,9 +10,7 @@ v-bind:email="user.email" v-on:update-email="onUpdateEmail" /> - + diff --git a/resources/assets/pterodactyl/scripts/components/auth/LoginForm.vue b/resources/assets/pterodactyl/scripts/components/auth/LoginForm.vue index 523bc10cf..ccc8105b8 100644 --- a/resources/assets/pterodactyl/scripts/components/auth/LoginForm.vue +++ b/resources/assets/pterodactyl/scripts/components/auth/LoginForm.vue @@ -2,11 +2,11 @@
-
+
@@ -26,6 +27,7 @@
@@ -43,7 +45,7 @@
- {{ $t('auth.forgot_password') }} + {{ $t('auth.forgot_password.label') }}
diff --git a/resources/assets/pterodactyl/scripts/components/auth/ResetPassword.vue b/resources/assets/pterodactyl/scripts/components/auth/ResetPassword.vue new file mode 100644 index 000000000..625926296 --- /dev/null +++ b/resources/assets/pterodactyl/scripts/components/auth/ResetPassword.vue @@ -0,0 +1,115 @@ + + + diff --git a/resources/assets/pterodactyl/scripts/components/auth/TwoFactorForm.vue b/resources/assets/pterodactyl/scripts/components/auth/TwoFactorForm.vue index 98a768521..36ec86907 100644 --- a/resources/assets/pterodactyl/scripts/components/auth/TwoFactorForm.vue +++ b/resources/assets/pterodactyl/scripts/components/auth/TwoFactorForm.vue @@ -40,7 +40,7 @@ submitToken: function () { const self = this; - axios.post(this.route('auth.checkpoint'), { + axios.post(this.route('auth.login-checkpoint'), { confirmation_token: this.$route.query.token, authentication_code: this.$data.code, }) diff --git a/resources/assets/pterodactyl/scripts/helpers/ziggy.js b/resources/assets/pterodactyl/scripts/helpers/ziggy.js index d833e76da..4db5d0ea2 100644 --- a/resources/assets/pterodactyl/scripts/helpers/ziggy.js +++ b/resources/assets/pterodactyl/scripts/helpers/ziggy.js @@ -1,5 +1,5 @@ var Ziggy = { - namedRoutes: JSON.parse('{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"],"domain":null},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"],"domain":null},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"],"domain":null},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"],"domain":null},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"],"domain":null},"index":{"uri":"\/","methods":["GET","HEAD"],"domain":null},"index.status":{"uri":"status\/{server}","methods":["GET","HEAD"],"domain":null},"account":{"uri":"account","methods":["GET","HEAD"],"domain":null},"account.api":{"uri":"account\/api","methods":["GET","HEAD"],"domain":null},"account.api.new":{"uri":"account\/api\/new","methods":["GET","HEAD"],"domain":null},"account.api.revoke":{"uri":"account\/api\/revoke\/{identifier}","methods":["DELETE"],"domain":null},"account.security":{"uri":"account\/security","methods":["GET","HEAD"],"domain":null},"account.security.revoke":{"uri":"account\/security\/revoke\/{id}","methods":["GET","HEAD"],"domain":null},"account.security.totp":{"uri":"account\/security\/totp","methods":["PUT"],"domain":null},"account.security.totp.set":{"uri":"account\/security\/totp","methods":["POST"],"domain":null},"account.security.totp.disable":{"uri":"account\/security\/totp","methods":["DELETE"],"domain":null},"admin.index":{"uri":"admin","methods":["GET","HEAD"],"domain":null},"admin.api.index":{"uri":"admin\/api","methods":["GET","HEAD"],"domain":null},"admin.api.new":{"uri":"admin\/api\/new","methods":["GET","HEAD"],"domain":null},"admin.api.delete":{"uri":"admin\/api\/revoke\/{identifier}","methods":["DELETE"],"domain":null},"admin.locations":{"uri":"admin\/locations","methods":["GET","HEAD"],"domain":null},"admin.locations.view":{"uri":"admin\/locations\/view\/{location}","methods":["GET","HEAD"],"domain":null},"admin.databases":{"uri":"admin\/databases","methods":["GET","HEAD"],"domain":null},"admin.databases.view":{"uri":"admin\/databases\/view\/{host}","methods":["GET","HEAD"],"domain":null},"admin.settings":{"uri":"admin\/settings","methods":["GET","HEAD"],"domain":null},"admin.settings.mail":{"uri":"admin\/settings\/mail","methods":["GET","HEAD"],"domain":null},"admin.settings.advanced":{"uri":"admin\/settings\/advanced","methods":["GET","HEAD"],"domain":null},"admin.users":{"uri":"admin\/users","methods":["GET","HEAD"],"domain":null},"admin.users.json":{"uri":"admin\/users\/accounts.json","methods":["GET","HEAD"],"domain":null},"admin.users.new":{"uri":"admin\/users\/new","methods":["GET","HEAD"],"domain":null},"admin.users.view":{"uri":"admin\/users\/view\/{user}","methods":["GET","HEAD"],"domain":null},"admin.servers":{"uri":"admin\/servers","methods":["GET","HEAD"],"domain":null},"admin.servers.new":{"uri":"admin\/servers\/new","methods":["GET","HEAD"],"domain":null},"admin.servers.view":{"uri":"admin\/servers\/view\/{server}","methods":["GET","HEAD"],"domain":null},"admin.servers.view.details":{"uri":"admin\/servers\/view\/{server}\/details","methods":["GET","HEAD"],"domain":null},"admin.servers.view.build":{"uri":"admin\/servers\/view\/{server}\/build","methods":["GET","HEAD"],"domain":null},"admin.servers.view.startup":{"uri":"admin\/servers\/view\/{server}\/startup","methods":["GET","HEAD"],"domain":null},"admin.servers.view.database":{"uri":"admin\/servers\/view\/{server}\/database","methods":["GET","HEAD"],"domain":null},"admin.servers.view.manage":{"uri":"admin\/servers\/view\/{server}\/manage","methods":["GET","HEAD"],"domain":null},"admin.servers.view.delete":{"uri":"admin\/servers\/view\/{server}\/delete","methods":["GET","HEAD"],"domain":null},"admin.servers.view.manage.toggle":{"uri":"admin\/servers\/view\/{server}\/manage\/toggle","methods":["POST"],"domain":null},"admin.servers.view.manage.rebuild":{"uri":"admin\/servers\/view\/{server}\/manage\/rebuild","methods":["POST"],"domain":null},"admin.servers.view.manage.suspension":{"uri":"admin\/servers\/view\/{server}\/manage\/suspension","methods":["POST"],"domain":null},"admin.servers.view.manage.reinstall":{"uri":"admin\/servers\/view\/{server}\/manage\/reinstall","methods":["POST"],"domain":null},"admin.servers.view.database.delete":{"uri":"admin\/servers\/view\/{server}\/database\/{database}\/delete","methods":["DELETE"],"domain":null},"admin.nodes":{"uri":"admin\/nodes","methods":["GET","HEAD"],"domain":null},"admin.nodes.new":{"uri":"admin\/nodes\/new","methods":["GET","HEAD"],"domain":null},"admin.nodes.view":{"uri":"admin\/nodes\/view\/{node}","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.settings":{"uri":"admin\/nodes\/view\/{node}\/settings","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.configuration":{"uri":"admin\/nodes\/view\/{node}\/configuration","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.allocation":{"uri":"admin\/nodes\/view\/{node}\/allocation","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.servers":{"uri":"admin\/nodes\/view\/{node}\/servers","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.configuration.token":{"uri":"admin\/nodes\/view\/{node}\/settings\/token","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.allocation.removeBlock":{"uri":"admin\/nodes\/view\/{node}\/allocation\/remove","methods":["POST"],"domain":null},"admin.nodes.view.allocation.setAlias":{"uri":"admin\/nodes\/view\/{node}\/allocation\/alias","methods":["POST"],"domain":null},"admin.nodes.view.delete":{"uri":"admin\/nodes\/view\/{node}\/delete","methods":["DELETE"],"domain":null},"admin.nodes.view.allocation.removeSingle":{"uri":"admin\/nodes\/view\/{node}\/allocation\/remove\/{allocation}","methods":["DELETE"],"domain":null},"admin.nests":{"uri":"admin\/nests","methods":["GET","HEAD"],"domain":null},"admin.nests.new":{"uri":"admin\/nests\/new","methods":["GET","HEAD"],"domain":null},"admin.nests.view":{"uri":"admin\/nests\/view\/{nest}","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.new":{"uri":"admin\/nests\/egg\/new","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.view":{"uri":"admin\/nests\/egg\/{egg}","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.export":{"uri":"admin\/nests\/egg\/{egg}\/export","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.variables":{"uri":"admin\/nests\/egg\/{egg}\/variables","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.scripts":{"uri":"admin\/nests\/egg\/{egg}\/scripts","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.import":{"uri":"admin\/nests\/import","methods":["POST"],"domain":null},"admin.nests.egg.variables.edit":{"uri":"admin\/nests\/egg\/{egg}\/variables\/{variable}","methods":["PATCH"],"domain":null},"admin.packs":{"uri":"admin\/packs","methods":["GET","HEAD"],"domain":null},"admin.packs.new":{"uri":"admin\/packs\/new","methods":["GET","HEAD"],"domain":null},"admin.packs.new.template":{"uri":"admin\/packs\/new\/template","methods":["GET","HEAD"],"domain":null},"admin.packs.view":{"uri":"admin\/packs\/view\/{pack}","methods":["GET","HEAD"],"domain":null},"admin.packs.view.export":{"uri":"admin\/packs\/view\/{pack}\/export\/{files?}","methods":["POST"],"domain":null},"auth.login":{"uri":"auth\/login","methods":["GET","HEAD"],"domain":null},"auth.checkpoint":{"uri":"auth\/login\/checkpoint","methods":["POST"],"domain":null},"auth.forgot-password.send-link":{"uri":"auth\/password","methods":["POST"],"domain":null},"auth.reset-password":{"uri":"auth\/password\/reset\/{token}","methods":["GET","HEAD"],"domain":null},"auth.reset-password.submit":{"uri":"auth\/password\/reset","methods":["POST"],"domain":null},"auth.logout":{"uri":"auth\/logout","methods":["GET","HEAD"],"domain":null},"server.index":{"uri":"server\/{server}","methods":["GET","HEAD"],"domain":null},"server.console":{"uri":"server\/{server}\/console","methods":["GET","HEAD"],"domain":null},"server.settings.allocation":{"uri":"server\/{server}\/settings\/allocation","methods":["GET","HEAD"],"domain":null},"server.settings.name":{"uri":"server\/{server}\/settings\/name","methods":["GET","HEAD"],"domain":null},"server.settings.sftp":{"uri":"server\/{server}\/settings\/sftp","methods":["GET","HEAD"],"domain":null},"server.settings.startup":{"uri":"server\/{server}\/settings\/startup","methods":["GET","HEAD"],"domain":null},"server.databases.index":{"uri":"server\/{server}\/databases","methods":["GET","HEAD"],"domain":null},"server.databases.new":{"uri":"server\/{server}\/databases\/new","methods":["POST"],"domain":null},"server.databases.password":{"uri":"server\/{server}\/databases\/password","methods":["PATCH"],"domain":null},"server.databases.delete":{"uri":"server\/{server}\/databases\/delete\/{database}","methods":["DELETE"],"domain":null},"server.files.index":{"uri":"server\/{server}\/files","methods":["GET","HEAD"],"domain":null},"server.files.add":{"uri":"server\/{server}\/files\/add","methods":["GET","HEAD"],"domain":null},"server.files.edit":{"uri":"server\/{server}\/files\/download\/{file}","methods":["GET","HEAD"],"domain":null},"server.files.directory-list":{"uri":"server\/{server}\/files\/directory-list","methods":["POST"],"domain":null},"server.files.save":{"uri":"server\/{server}\/files\/save","methods":["POST"],"domain":null},"server.subusers":{"uri":"server\/{server}\/users","methods":["GET","HEAD"],"domain":null},"server.subusers.new":{"uri":"server\/{server}\/users\/new","methods":["GET","HEAD"],"domain":null},"server.subusers.view":{"uri":"server\/{server}\/users\/view\/{subuser}","methods":["GET","HEAD"],"domain":null},"server.schedules":{"uri":"server\/{server}\/schedules","methods":["GET","HEAD"],"domain":null},"server.schedules.new":{"uri":"server\/{server}\/schedules\/new","methods":["GET","HEAD"],"domain":null},"server.schedules.view":{"uri":"server\/{server}\/schedules\/view\/{schedule}","methods":["GET","HEAD"],"domain":null},"server.schedules.toggle":{"uri":"server\/{server}\/schedules\/view\/{schedule}\/toggle","methods":["POST"],"domain":null},"server.schedules.trigger":{"uri":"server\/{server}\/schedules\/view\/{schedule}\/trigger","methods":["POST"],"domain":null},"api.application.users":{"uri":"api\/application\/users","methods":["GET","HEAD"],"domain":null},"api.application.users.view":{"uri":"api\/application\/users\/{user}","methods":["GET","HEAD"],"domain":null},"api.application.users.external":{"uri":"api\/application\/users\/external\/{external_id}","methods":["GET","HEAD"],"domain":null},"api.application.nodes":{"uri":"api\/application\/nodes","methods":["GET","HEAD"],"domain":null},"api.application.nodes.view":{"uri":"api\/application\/nodes\/{node}","methods":["GET","HEAD"],"domain":null},"api.application.allocations":{"uri":"api\/application\/nodes\/{node}\/allocations","methods":["GET","HEAD"],"domain":null},"api.application.allocations.view":{"uri":"api\/application\/nodes\/{node}\/allocations\/{allocation}","methods":["DELETE"],"domain":null},"api.applications.locations":{"uri":"api\/application\/locations","methods":["GET","HEAD"],"domain":null},"api.application.locations.view":{"uri":"api\/application\/locations\/{location}","methods":["GET","HEAD"],"domain":null},"api.application.servers":{"uri":"api\/application\/servers","methods":["GET","HEAD"],"domain":null},"api.application.servers.view":{"uri":"api\/application\/servers\/{server}","methods":["GET","HEAD"],"domain":null},"api.application.servers.external":{"uri":"api\/application\/servers\/external\/{external_id}","methods":["GET","HEAD"],"domain":null},"api.application.servers.details":{"uri":"api\/application\/servers\/{server}\/details","methods":["PATCH"],"domain":null},"api.application.servers.build":{"uri":"api\/application\/servers\/{server}\/build","methods":["PATCH"],"domain":null},"api.application.servers.startup":{"uri":"api\/application\/servers\/{server}\/startup","methods":["PATCH"],"domain":null},"api.application.servers.suspend":{"uri":"api\/application\/servers\/{server}\/suspend","methods":["POST"],"domain":null},"api.application.servers.unsuspend":{"uri":"api\/application\/servers\/{server}\/unsuspend","methods":["POST"],"domain":null},"api.application.servers.reinstall":{"uri":"api\/application\/servers\/{server}\/reinstall","methods":["POST"],"domain":null},"api.application.servers.rebuild":{"uri":"api\/application\/servers\/{server}\/rebuild","methods":["POST"],"domain":null},"api.application.servers.databases":{"uri":"api\/application\/servers\/{server}\/databases","methods":["GET","HEAD"],"domain":null},"api.application.servers.databases.view":{"uri":"api\/application\/servers\/{server}\/databases\/{database}","methods":["GET","HEAD"],"domain":null},"api.application.nests":{"uri":"api\/application\/nests","methods":["GET","HEAD"],"domain":null},"api.application.nests.view":{"uri":"api\/application\/nests\/{nest}","methods":["GET","HEAD"],"domain":null},"api.application.nests.eggs":{"uri":"api\/application\/nests\/{nest}\/eggs","methods":["GET","HEAD"],"domain":null},"api.application.nests.eggs.view":{"uri":"api\/application\/nests\/{nest}\/eggs\/{egg}","methods":["GET","HEAD"],"domain":null},"api.client.index":{"uri":"api\/client","methods":["GET","HEAD"],"domain":null},"api.client.servers.view":{"uri":"api\/client\/servers\/{server}","methods":["GET","HEAD"],"domain":null},"api.client.servers.resources":{"uri":"api\/client\/servers\/{server}\/utilization","methods":["GET","HEAD"],"domain":null},"api.client.servers.command":{"uri":"api\/client\/servers\/{server}\/command","methods":["POST"],"domain":null},"api.client.servers.power":{"uri":"api\/client\/servers\/{server}\/power","methods":["POST"],"domain":null},"api.remote.authenticate":{"uri":"api\/remote\/authenticate\/{token}","methods":["GET","HEAD"],"domain":null},"api.remote.download_file":{"uri":"api\/remote\/download-file","methods":["POST"],"domain":null},"api.remote.eggs":{"uri":"api\/remote\/eggs","methods":["GET","HEAD"],"domain":null},"api.remote.eggs.download":{"uri":"api\/remote\/eggs\/{uuid}","methods":["GET","HEAD"],"domain":null},"api.remote.scripts":{"uri":"api\/remote\/scripts\/{uuid}","methods":["GET","HEAD"],"domain":null},"api.remote.sftp":{"uri":"api\/remote\/sftp","methods":["POST"],"domain":null},"daemon.pack.pull":{"uri":"daemon\/packs\/pull\/{uuid}","methods":["GET","HEAD"],"domain":null},"daemon.pack.hash":{"uri":"daemon\/packs\/pull\/{uuid}\/hash","methods":["GET","HEAD"],"domain":null},"daemon.configuration":{"uri":"daemon\/configure\/{token}","methods":["GET","HEAD"],"domain":null},"daemon.install":{"uri":"daemon\/install","methods":["POST"],"domain":null}}'), + namedRoutes: JSON.parse('{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"],"domain":null},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"],"domain":null},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"],"domain":null},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"],"domain":null},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"],"domain":null},"index":{"uri":"\/","methods":["GET","HEAD"],"domain":null},"index.status":{"uri":"status\/{server}","methods":["GET","HEAD"],"domain":null},"account":{"uri":"account","methods":["GET","HEAD"],"domain":null},"account.api":{"uri":"account\/api","methods":["GET","HEAD"],"domain":null},"account.api.new":{"uri":"account\/api\/new","methods":["GET","HEAD"],"domain":null},"account.api.revoke":{"uri":"account\/api\/revoke\/{identifier}","methods":["DELETE"],"domain":null},"account.security":{"uri":"account\/security","methods":["GET","HEAD"],"domain":null},"account.security.revoke":{"uri":"account\/security\/revoke\/{id}","methods":["GET","HEAD"],"domain":null},"account.security.totp":{"uri":"account\/security\/totp","methods":["PUT"],"domain":null},"account.security.totp.set":{"uri":"account\/security\/totp","methods":["POST"],"domain":null},"account.security.totp.disable":{"uri":"account\/security\/totp","methods":["DELETE"],"domain":null},"admin.index":{"uri":"admin","methods":["GET","HEAD"],"domain":null},"admin.api.index":{"uri":"admin\/api","methods":["GET","HEAD"],"domain":null},"admin.api.new":{"uri":"admin\/api\/new","methods":["GET","HEAD"],"domain":null},"admin.api.delete":{"uri":"admin\/api\/revoke\/{identifier}","methods":["DELETE"],"domain":null},"admin.locations":{"uri":"admin\/locations","methods":["GET","HEAD"],"domain":null},"admin.locations.view":{"uri":"admin\/locations\/view\/{location}","methods":["GET","HEAD"],"domain":null},"admin.databases":{"uri":"admin\/databases","methods":["GET","HEAD"],"domain":null},"admin.databases.view":{"uri":"admin\/databases\/view\/{host}","methods":["GET","HEAD"],"domain":null},"admin.settings":{"uri":"admin\/settings","methods":["GET","HEAD"],"domain":null},"admin.settings.mail":{"uri":"admin\/settings\/mail","methods":["GET","HEAD"],"domain":null},"admin.settings.advanced":{"uri":"admin\/settings\/advanced","methods":["GET","HEAD"],"domain":null},"admin.users":{"uri":"admin\/users","methods":["GET","HEAD"],"domain":null},"admin.users.json":{"uri":"admin\/users\/accounts.json","methods":["GET","HEAD"],"domain":null},"admin.users.new":{"uri":"admin\/users\/new","methods":["GET","HEAD"],"domain":null},"admin.users.view":{"uri":"admin\/users\/view\/{user}","methods":["GET","HEAD"],"domain":null},"admin.servers":{"uri":"admin\/servers","methods":["GET","HEAD"],"domain":null},"admin.servers.new":{"uri":"admin\/servers\/new","methods":["GET","HEAD"],"domain":null},"admin.servers.view":{"uri":"admin\/servers\/view\/{server}","methods":["GET","HEAD"],"domain":null},"admin.servers.view.details":{"uri":"admin\/servers\/view\/{server}\/details","methods":["GET","HEAD"],"domain":null},"admin.servers.view.build":{"uri":"admin\/servers\/view\/{server}\/build","methods":["GET","HEAD"],"domain":null},"admin.servers.view.startup":{"uri":"admin\/servers\/view\/{server}\/startup","methods":["GET","HEAD"],"domain":null},"admin.servers.view.database":{"uri":"admin\/servers\/view\/{server}\/database","methods":["GET","HEAD"],"domain":null},"admin.servers.view.manage":{"uri":"admin\/servers\/view\/{server}\/manage","methods":["GET","HEAD"],"domain":null},"admin.servers.view.delete":{"uri":"admin\/servers\/view\/{server}\/delete","methods":["GET","HEAD"],"domain":null},"admin.servers.view.manage.toggle":{"uri":"admin\/servers\/view\/{server}\/manage\/toggle","methods":["POST"],"domain":null},"admin.servers.view.manage.rebuild":{"uri":"admin\/servers\/view\/{server}\/manage\/rebuild","methods":["POST"],"domain":null},"admin.servers.view.manage.suspension":{"uri":"admin\/servers\/view\/{server}\/manage\/suspension","methods":["POST"],"domain":null},"admin.servers.view.manage.reinstall":{"uri":"admin\/servers\/view\/{server}\/manage\/reinstall","methods":["POST"],"domain":null},"admin.servers.view.database.delete":{"uri":"admin\/servers\/view\/{server}\/database\/{database}\/delete","methods":["DELETE"],"domain":null},"admin.nodes":{"uri":"admin\/nodes","methods":["GET","HEAD"],"domain":null},"admin.nodes.new":{"uri":"admin\/nodes\/new","methods":["GET","HEAD"],"domain":null},"admin.nodes.view":{"uri":"admin\/nodes\/view\/{node}","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.settings":{"uri":"admin\/nodes\/view\/{node}\/settings","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.configuration":{"uri":"admin\/nodes\/view\/{node}\/configuration","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.allocation":{"uri":"admin\/nodes\/view\/{node}\/allocation","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.servers":{"uri":"admin\/nodes\/view\/{node}\/servers","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.configuration.token":{"uri":"admin\/nodes\/view\/{node}\/settings\/token","methods":["GET","HEAD"],"domain":null},"admin.nodes.view.allocation.removeBlock":{"uri":"admin\/nodes\/view\/{node}\/allocation\/remove","methods":["POST"],"domain":null},"admin.nodes.view.allocation.setAlias":{"uri":"admin\/nodes\/view\/{node}\/allocation\/alias","methods":["POST"],"domain":null},"admin.nodes.view.delete":{"uri":"admin\/nodes\/view\/{node}\/delete","methods":["DELETE"],"domain":null},"admin.nodes.view.allocation.removeSingle":{"uri":"admin\/nodes\/view\/{node}\/allocation\/remove\/{allocation}","methods":["DELETE"],"domain":null},"admin.nests":{"uri":"admin\/nests","methods":["GET","HEAD"],"domain":null},"admin.nests.new":{"uri":"admin\/nests\/new","methods":["GET","HEAD"],"domain":null},"admin.nests.view":{"uri":"admin\/nests\/view\/{nest}","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.new":{"uri":"admin\/nests\/egg\/new","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.view":{"uri":"admin\/nests\/egg\/{egg}","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.export":{"uri":"admin\/nests\/egg\/{egg}\/export","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.variables":{"uri":"admin\/nests\/egg\/{egg}\/variables","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.scripts":{"uri":"admin\/nests\/egg\/{egg}\/scripts","methods":["GET","HEAD"],"domain":null},"admin.nests.egg.import":{"uri":"admin\/nests\/import","methods":["POST"],"domain":null},"admin.nests.egg.variables.edit":{"uri":"admin\/nests\/egg\/{egg}\/variables\/{variable}","methods":["PATCH"],"domain":null},"admin.packs":{"uri":"admin\/packs","methods":["GET","HEAD"],"domain":null},"admin.packs.new":{"uri":"admin\/packs\/new","methods":["GET","HEAD"],"domain":null},"admin.packs.new.template":{"uri":"admin\/packs\/new\/template","methods":["GET","HEAD"],"domain":null},"admin.packs.view":{"uri":"admin\/packs\/view\/{pack}","methods":["GET","HEAD"],"domain":null},"admin.packs.view.export":{"uri":"admin\/packs\/view\/{pack}\/export\/{files?}","methods":["POST"],"domain":null},"auth.login":{"uri":"auth\/login","methods":["GET","HEAD"],"domain":null},"auth.login-checkpoint":{"uri":"auth\/login\/checkpoint","methods":["POST"],"domain":null},"auth.forgot-password":{"uri":"auth\/password","methods":["POST"],"domain":null},"auth.reset-password":{"uri":"auth\/password\/reset","methods":["POST"],"domain":null},"auth.logout":{"uri":"auth\/logout","methods":["GET","HEAD"],"domain":null},"server.index":{"uri":"server\/{server}","methods":["GET","HEAD"],"domain":null},"server.console":{"uri":"server\/{server}\/console","methods":["GET","HEAD"],"domain":null},"server.settings.allocation":{"uri":"server\/{server}\/settings\/allocation","methods":["GET","HEAD"],"domain":null},"server.settings.name":{"uri":"server\/{server}\/settings\/name","methods":["GET","HEAD"],"domain":null},"server.settings.sftp":{"uri":"server\/{server}\/settings\/sftp","methods":["GET","HEAD"],"domain":null},"server.settings.startup":{"uri":"server\/{server}\/settings\/startup","methods":["GET","HEAD"],"domain":null},"server.databases.index":{"uri":"server\/{server}\/databases","methods":["GET","HEAD"],"domain":null},"server.databases.new":{"uri":"server\/{server}\/databases\/new","methods":["POST"],"domain":null},"server.databases.password":{"uri":"server\/{server}\/databases\/password","methods":["PATCH"],"domain":null},"server.databases.delete":{"uri":"server\/{server}\/databases\/delete\/{database}","methods":["DELETE"],"domain":null},"server.files.index":{"uri":"server\/{server}\/files","methods":["GET","HEAD"],"domain":null},"server.files.add":{"uri":"server\/{server}\/files\/add","methods":["GET","HEAD"],"domain":null},"server.files.edit":{"uri":"server\/{server}\/files\/download\/{file}","methods":["GET","HEAD"],"domain":null},"server.files.directory-list":{"uri":"server\/{server}\/files\/directory-list","methods":["POST"],"domain":null},"server.files.save":{"uri":"server\/{server}\/files\/save","methods":["POST"],"domain":null},"server.subusers":{"uri":"server\/{server}\/users","methods":["GET","HEAD"],"domain":null},"server.subusers.new":{"uri":"server\/{server}\/users\/new","methods":["GET","HEAD"],"domain":null},"server.subusers.view":{"uri":"server\/{server}\/users\/view\/{subuser}","methods":["GET","HEAD"],"domain":null},"server.schedules":{"uri":"server\/{server}\/schedules","methods":["GET","HEAD"],"domain":null},"server.schedules.new":{"uri":"server\/{server}\/schedules\/new","methods":["GET","HEAD"],"domain":null},"server.schedules.view":{"uri":"server\/{server}\/schedules\/view\/{schedule}","methods":["GET","HEAD"],"domain":null},"server.schedules.toggle":{"uri":"server\/{server}\/schedules\/view\/{schedule}\/toggle","methods":["POST"],"domain":null},"server.schedules.trigger":{"uri":"server\/{server}\/schedules\/view\/{schedule}\/trigger","methods":["POST"],"domain":null},"api.application.users":{"uri":"api\/application\/users","methods":["GET","HEAD"],"domain":null},"api.application.users.view":{"uri":"api\/application\/users\/{user}","methods":["GET","HEAD"],"domain":null},"api.application.users.external":{"uri":"api\/application\/users\/external\/{external_id}","methods":["GET","HEAD"],"domain":null},"api.application.nodes":{"uri":"api\/application\/nodes","methods":["GET","HEAD"],"domain":null},"api.application.nodes.view":{"uri":"api\/application\/nodes\/{node}","methods":["GET","HEAD"],"domain":null},"api.application.allocations":{"uri":"api\/application\/nodes\/{node}\/allocations","methods":["GET","HEAD"],"domain":null},"api.application.allocations.view":{"uri":"api\/application\/nodes\/{node}\/allocations\/{allocation}","methods":["DELETE"],"domain":null},"api.applications.locations":{"uri":"api\/application\/locations","methods":["GET","HEAD"],"domain":null},"api.application.locations.view":{"uri":"api\/application\/locations\/{location}","methods":["GET","HEAD"],"domain":null},"api.application.servers":{"uri":"api\/application\/servers","methods":["GET","HEAD"],"domain":null},"api.application.servers.view":{"uri":"api\/application\/servers\/{server}","methods":["GET","HEAD"],"domain":null},"api.application.servers.external":{"uri":"api\/application\/servers\/external\/{external_id}","methods":["GET","HEAD"],"domain":null},"api.application.servers.details":{"uri":"api\/application\/servers\/{server}\/details","methods":["PATCH"],"domain":null},"api.application.servers.build":{"uri":"api\/application\/servers\/{server}\/build","methods":["PATCH"],"domain":null},"api.application.servers.startup":{"uri":"api\/application\/servers\/{server}\/startup","methods":["PATCH"],"domain":null},"api.application.servers.suspend":{"uri":"api\/application\/servers\/{server}\/suspend","methods":["POST"],"domain":null},"api.application.servers.unsuspend":{"uri":"api\/application\/servers\/{server}\/unsuspend","methods":["POST"],"domain":null},"api.application.servers.reinstall":{"uri":"api\/application\/servers\/{server}\/reinstall","methods":["POST"],"domain":null},"api.application.servers.rebuild":{"uri":"api\/application\/servers\/{server}\/rebuild","methods":["POST"],"domain":null},"api.application.servers.databases":{"uri":"api\/application\/servers\/{server}\/databases","methods":["GET","HEAD"],"domain":null},"api.application.servers.databases.view":{"uri":"api\/application\/servers\/{server}\/databases\/{database}","methods":["GET","HEAD"],"domain":null},"api.application.nests":{"uri":"api\/application\/nests","methods":["GET","HEAD"],"domain":null},"api.application.nests.view":{"uri":"api\/application\/nests\/{nest}","methods":["GET","HEAD"],"domain":null},"api.application.nests.eggs":{"uri":"api\/application\/nests\/{nest}\/eggs","methods":["GET","HEAD"],"domain":null},"api.application.nests.eggs.view":{"uri":"api\/application\/nests\/{nest}\/eggs\/{egg}","methods":["GET","HEAD"],"domain":null},"api.client.index":{"uri":"api\/client","methods":["GET","HEAD"],"domain":null},"api.client.servers.view":{"uri":"api\/client\/servers\/{server}","methods":["GET","HEAD"],"domain":null},"api.client.servers.resources":{"uri":"api\/client\/servers\/{server}\/utilization","methods":["GET","HEAD"],"domain":null},"api.client.servers.command":{"uri":"api\/client\/servers\/{server}\/command","methods":["POST"],"domain":null},"api.client.servers.power":{"uri":"api\/client\/servers\/{server}\/power","methods":["POST"],"domain":null},"api.remote.authenticate":{"uri":"api\/remote\/authenticate\/{token}","methods":["GET","HEAD"],"domain":null},"api.remote.download_file":{"uri":"api\/remote\/download-file","methods":["POST"],"domain":null},"api.remote.eggs":{"uri":"api\/remote\/eggs","methods":["GET","HEAD"],"domain":null},"api.remote.eggs.download":{"uri":"api\/remote\/eggs\/{uuid}","methods":["GET","HEAD"],"domain":null},"api.remote.scripts":{"uri":"api\/remote\/scripts\/{uuid}","methods":["GET","HEAD"],"domain":null},"api.remote.sftp":{"uri":"api\/remote\/sftp","methods":["POST"],"domain":null},"daemon.pack.pull":{"uri":"daemon\/packs\/pull\/{uuid}","methods":["GET","HEAD"],"domain":null},"daemon.pack.hash":{"uri":"daemon\/packs\/pull\/{uuid}\/hash","methods":["GET","HEAD"],"domain":null},"daemon.configuration":{"uri":"daemon\/configure\/{token}","methods":["GET","HEAD"],"domain":null},"daemon.install":{"uri":"daemon\/install","methods":["POST"],"domain":null}}'), baseUrl: 'http://pterodactyl.local/', baseProtocol: 'http', baseDomain: 'pterodactyl.local', diff --git a/resources/assets/pterodactyl/styles/components/authentication.css b/resources/assets/pterodactyl/styles/components/authentication.css index a529bbf23..c569369f1 100644 --- a/resources/assets/pterodactyl/styles/components/authentication.css +++ b/resources/assets/pterodactyl/styles/components/authentication.css @@ -11,23 +11,18 @@ transition: border 500ms ease-out; } - &:focus + label, &:valid + label { + &:focus + label, &:valid + label, &.has-content + label { @apply .text-grey-darker .px-0 .cursor-pointer; transform:translateY(-26px) } - &:invalid + label { - @apply .text-grey .px-1; - transform:translateY(0) - } - &:required { box-shadow: none; } } .input-open > label { - @apply .block .uppercase .tracking-wide .text-grey .text-xs .mb-2 .absolute .px-1; + @apply .block .uppercase .tracking-wide .text-grey .text-xs .mb-2 .absolute; top: 14px; transition: transform 200ms ease-out; } diff --git a/resources/assets/pterodactyl/styles/components/buttons.css b/resources/assets/pterodactyl/styles/components/buttons.css index 08cf2a519..d2721777f 100644 --- a/resources/assets/pterodactyl/styles/components/buttons.css +++ b/resources/assets/pterodactyl/styles/components/buttons.css @@ -19,7 +19,7 @@ @apply .p-4 .w-full .uppercase .tracking-wide .text-sm; } - &:disabled { + &:disabled, &.disabled { opacity: 0.55; cursor: default; } diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index c94227b8c..725c9fbc1 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -1,31 +1,27 @@ 'You are not authorized to perform this action.', - 'auth_error' => 'There was an error while attempting to login.', - 'authentication_required' => 'Authentication is required to continue.', - 'remember_me' => 'Remember Me', 'sign_in' => 'Sign In', - 'forgot_password' => 'Forgot Password?', 'go_to_login' => 'Go to Login', - 'reset_help_text' => 'Enter your account email address to recive instructions on resetting your password.', - 'recover_account' => 'Recover Account', + 'failed' => 'No account matching those credentials could be found.', + + 'forgot_password' => [ + 'label' => 'Forgot Password?', + 'label_help' => 'Enter your account email address to recive instructions on resetting your password.', + 'button' => 'Recover Account', + ], + + 'reset_password' => [ + 'button' => 'Reset and Sign In', + ], 'two_factor' => [ 'label' => '2-Factor Token', 'label_help' => 'This account requires a second layer of authentication in order to continue. Please enter the code generated by your device to complete this login.', + 'checkpoint_failed' => 'The two-factor authentication token was invalid.', ], - 'reset_password_text' => 'Reset your account password.', - 'reset_password' => 'Reset Account Password', - 'email_sent' => 'An email has been sent to you with further instructions for resetting your password.', - 'failed' => 'No account matching those credentials could be found.', - 'checkpoint_failed' => 'The two-factor authentication token was invalid.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - 'password_requirements' => 'Passwords must contain at least one uppercase, lowercase, and numeric character and must be at least 8 characters in length.', - 'request_reset' => 'Locate Account', - '2fa_required' => '2-Factor Authentication', - '2fa_failed' => 'The 2FA token provided was invalid.', - 'totp_failed' => 'There was an error while attempting to validate TOTP.', + 'password_requirements' => 'Password must be at least 8 characters in length and should be unique to this site.', '2fa_must_be_enabled' => 'The administrator has required that 2-Factor Authentication be enabled for your account in order to use the Panel.', ]; diff --git a/resources/themes/pterodactyl/auth/login.blade.php b/resources/themes/pterodactyl/auth/login.blade.php index 9d14992a3..04730edf7 100644 --- a/resources/themes/pterodactyl/auth/login.blade.php +++ b/resources/themes/pterodactyl/auth/login.blade.php @@ -1,75 +1,5 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} @extends('templates/auth.core') @section('title') Login @endsection - -{{--@section('content')--}} -{{--
--}} - {{--
--}} - {{--@if (count($errors) > 0)--}} - {{--
--}} - {{----}} - {{--@lang('auth.auth_error')

--}} - {{--
    --}} - {{--@foreach ($errors->all() as $error)--}} - {{--
  • {{ $error }}
  • --}} - {{--@endforeach--}} - {{--
--}} - {{--
--}} - {{--@endif--}} - {{--@foreach (Alert::getMessages() as $type => $messages)--}} - {{--@foreach ($messages as $message)--}} - {{----}} - {{--@endforeach--}} - {{--@endforeach--}} - {{--
--}} -{{--
--}} -{{--
--}} - {{----}} -{{--
--}} -{{--@endsection--}} - -{{--@section('scripts')--}} - {{--@parent--}} - {{--@if(config('recaptcha.enabled'))--}} - {{----}} - {{----}} - {{--@endif--}} -{{--@endsection--}} diff --git a/resources/themes/pterodactyl/auth/passwords/email.blade.php b/resources/themes/pterodactyl/auth/passwords/email.blade.php deleted file mode 100644 index d90d36c50..000000000 --- a/resources/themes/pterodactyl/auth/passwords/email.blade.php +++ /dev/null @@ -1,71 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.auth') - -@section('title') - Forgot Password -@endsection - -@section('content') -
-
- @if (count($errors) > 0) -
- - @lang('auth.auth_error')

-
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
-
- @endif - @if (session('status')) -
- @lang('auth.email_sent') -
- @endif -
-
-
- -
-@endsection - -@section('scripts') - @parent - @if(config('recaptcha.enabled')) - - - @endif -@endsection diff --git a/resources/themes/pterodactyl/auth/passwords/reset.blade.php b/resources/themes/pterodactyl/auth/passwords/reset.blade.php deleted file mode 100644 index 08968cd62..000000000 --- a/resources/themes/pterodactyl/auth/passwords/reset.blade.php +++ /dev/null @@ -1,90 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.auth') - -@section('title') - Reset Password -@endsection - -@section('content') -
-
- @if (count($errors) > 0) -
- - @lang('auth.auth_error')

-
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
-
- @endif -
-
-
- -
-@endsection - -@section('scripts') - @parent - @if(config('recaptcha.enabled')) - - - @endif -@endsection diff --git a/resources/themes/pterodactyl/auth/totp.blade.php b/resources/themes/pterodactyl/auth/totp.blade.php deleted file mode 100644 index 3c1ee2533..000000000 --- a/resources/themes/pterodactyl/auth/totp.blade.php +++ /dev/null @@ -1,42 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.auth') - -@section('title') - 2FA Checkpoint -@endsection - -@section('scripts') - @parent - -@endsection - -@section('content') -
- -
-@endsection diff --git a/routes/auth.php b/routes/auth.php index fe1e65f0c..261c1bb64 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -12,17 +12,16 @@ Route::group(['middleware' => 'guest'], function () { // Login specific routes Route::get('/login', 'LoginController@showLoginForm')->name('auth.login'); Route::post('/login', 'LoginController@login')->middleware('recaptcha'); - Route::post('/login/checkpoint', 'LoginCheckpointController@index')->name('auth.checkpoint'); + Route::post('/login/checkpoint', 'LoginCheckpointController')->name('auth.login-checkpoint'); // Forgot password route. A post to this endpoint will trigger an // email to be sent containing a reset token. - Route::post('/password', 'ForgotPasswordController@sendResetLinkEmail')->name('auth.forgot-password.send-link')->middleware('recaptcha'); + Route::post('/password', 'ForgotPasswordController@sendResetLinkEmail')->name('auth.forgot-password')->middleware('recaptcha'); // Password reset routes. This endpoint is hit after going through // the forgot password routes to acquire a token (or after an account // is created). - Route::get('/password/reset/{token}', 'ResetPasswordController@showResetForm')->name('auth.reset-password'); - Route::post('/password/reset', 'ResetPasswordController@reset')->name('auth.reset.post')->middleware('recaptcha'); + Route::post('/password/reset', 'ResetPasswordController')->name('auth.reset-password')->middleware('recaptcha'); }); /*