Skip to content

Commit

Permalink
Merge branch 'release/3.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Sep 29, 2021
2 parents 813cd31 + 1bf1fde commit 9802176
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# v3.5.3
## 09/29/2021

1. [](#bugfix)
* Fixed double language in redirection after successful login [grav#3411](https://github.com/getgrav/grav/issues/3411)

# v3.5.2
## 09/14/2021

1. [](#bugfix)
* Fixed broken CLI [#280](https://github.com/getgrav/grav-plugin-login/issues/280)
* Remove dynamic defaults in `route_after_login` and `route_after_login` settings as they have no effect
1. [](#new)
* Require **Grav 1.7.21**
* Added support for `{% throw 401 'Unauthorized' %}` and `{% throw 403 'Forbidden' %}` from twig template to show appropriate login pages
2. [](#improved)
1. [](#improved)
* Unauthorized page uses now `HTTP 403` code
* Remove notification on unauthorized page
1. [](#bugfix)
* Fixed broken CLI [#280](https://github.com/getgrav/grav-plugin-login/issues/280)
* Remove dynamic defaults in `route_after_login` and `route_after_login` settings as they have no effect

# v3.5.1
## 08/31/2021
Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Login
slug: login
type: plugin
version: 3.5.2
version: 3.5.3
testing: false
description: Enables user authentication and login screen.
icon: sign-in
Expand Down
6 changes: 3 additions & 3 deletions classes/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ public function taskLogin()

$event->defRedirect(
$this->grav['session']->redirect_after_login ?:
$login_redirect ?: $this->grav['uri']->referrer('/')
$login_redirect ?: $this->grav['uri']->referrer('/', '', true)
);
} else {
$redirect_to_login = $this->grav['config']->get('plugins.login.redirect_to_login');
$redirect_route = $redirect_to_login ? $this->login->getRoute('login') : null;
$event->defRedirect($redirect_route ?? $this->grav['uri']->referrer('/'));
$event->defRedirect($redirect_route ?? $this->grav['uri']->referrer('/', '', true));
}
} else {
if ($user->authorized) {
Expand Down Expand Up @@ -237,7 +237,7 @@ public function taskTwoFa()
$login_redirect = $this->login->getRoute('after_login');

$event->setRedirect(
$this->grav['session']->redirect_after_login ?: $login_redirect ?: $this->grav['uri']->referrer('/'),
$this->grav['session']->redirect_after_login ?: $login_redirect ?: $this->grav['uri']->referrer('/', '', true),
303
);
}
Expand Down

0 comments on commit 9802176

Please sign in to comment.