Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
b29552d8
Commit
b29552d8
authored
Apr 13, 2021
by
Francesc Guasch
Browse files
test: SSO tweaks
PR #1513
parent
45e0669d
Changes
2
Hide whitespace changes
Inline
Side-by-side
script/rvd_front
View file @
b29552d8
...
...
@@ -2061,7 +2061,7 @@ sub login($c, $status=200) {
$c->session(auto_view => $auto_view, expiration => $expiration);
app->log->info("Access granted to $login from "._remote_ip($c)) if $CONFIG_FRONT->{log}->{log};
return $c->redirect_to($url);
} elsif (defined $c->param('submit')) {
} elsif (defined $c->param('submit')
|| $login || $password
) {
app->log->error("Access denied to $login from "._remote_ip($c)) if $CONFIG_FRONT->{log}->{log};
push @error,("Access denied");
}
...
...
t/mojo/10_login.t
View file @
b29552d8
...
...
@@ -178,7 +178,7 @@ sub test_login_fail {
$t
->
post_ok
('
/login
'
=>
form
=>
{
login
=>
"
fail
",
password
=>
'
bigtime
'});
is
(
$t
->
tx
->
res
->
code
(),
403
);
$t
->
get_ok
("
/admin/machines
")
->
status_is
(
401
);
is
(
$t
->
tx
->
res
->
dom
->
at
("
button#submit
")
->
text
,'
Login
')
or
exit
;
like
(
$t
->
tx
->
res
->
dom
->
at
("
button#submit
")
->
text
,
qr
'Login'
)
or
exit
;
login
(
user_admin
->
name
,
"
$$ $$
");
...
...
@@ -186,7 +186,7 @@ sub test_login_fail {
is
(
$t
->
tx
->
res
->
code
(),
403
);
$t
->
get_ok
("
/admin/machines
")
->
status_is
(
401
);
is
(
$t
->
tx
->
res
->
dom
->
at
("
button#submit
")
->
text
,'
Login
')
or
exit
;
like
(
$t
->
tx
->
res
->
dom
->
at
("
button#submit
")
->
text
,
qr
'Login'
)
or
exit
;
}
sub
test_validate_html
($url) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment