If SAML required, don't accept login form post.
This commit is contained in:
parent
696943b04b
commit
a6116a1b15
1 changed files with 7 additions and 0 deletions
|
@ -75,6 +75,7 @@ class LoginController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
//If the environment is set to ALWAYS require SAML, go straight to the SAML route.
|
//If the environment is set to ALWAYS require SAML, go straight to the SAML route.
|
||||||
|
//We don't need to check other settings, as this should override those.
|
||||||
if((env("REQUIRE_SAML", false)))
|
if((env("REQUIRE_SAML", false)))
|
||||||
{
|
{
|
||||||
return redirect()->route('saml.login');
|
return redirect()->route('saml.login');
|
||||||
|
@ -207,6 +208,12 @@ class LoginController extends Controller
|
||||||
*/
|
*/
|
||||||
public function login(Request $request)
|
public function login(Request $request)
|
||||||
{
|
{
|
||||||
|
//If the environment is set to ALWAYS require SAML, return access denied
|
||||||
|
if((env("REQUIRE_SAML", false)))
|
||||||
|
{
|
||||||
|
return view('errors.403');
|
||||||
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->login_common_disabled == '1') {
|
if (Setting::getSettings()->login_common_disabled == '1') {
|
||||||
return view('errors.403');
|
return view('errors.403');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue