Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CAS login test #829

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/12login/02cas.pl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use URI::Escape;

sub wait_for_cas_request
{
my ( $expected_path, %params ) = @_;
Expand Down Expand Up @@ -109,12 +111,12 @@ sub wait_for_cas_request
do => sub {
my ( $http, $homeserver_info ) = @_;

my $HS_URI = $homeserver_info->client_location;

# the redirectUrl we send to /login/cas/redirect, which is where we
# hope to get redirected back to
my $REDIRECT_URL = "https://client?p=http%3A%2F%2Fserver";

my $HS_URI = $homeserver_info->client_location . "/_matrix/client/r0/login/cas/ticket?redirectUrl=" . uri_escape($REDIRECT_URL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we not just check that the service provided to cas/proxyValidate matches that given to cas/login, rather than hardcoding what we expect it to be?


# the ticket our mocked-up CAS server "generates"
my $CAS_TICKET = "goldenticket";

Expand Down