Skip to content

Commit

Permalink
Addressing POST /saml-redirect-uri/postResponse failing with
Browse files Browse the repository at this point in the history
User has disabled cookies, or has lost the cookie before returning from the SAML2 login server.
  • Loading branch information
Jan Pazdziora committed Apr 18, 2023
1 parent 314dc14 commit c256b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: make build
- run: sudo apt update && sudo apt install -y libwww-mechanize-perl
- run: sudo apt update && sudo apt install -y libwww-mechanize-perl libhttp-cookiejar-perl
- run: echo '127.0.0.5 www keycloak' | sudo tee -a /etc/hosts
- run: make run
- run: make test
Expand Down
5 changes: 3 additions & 2 deletions tests/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
print "Will test against [$URL] with non-admin [$USERNAME/$PASSWORD]\n";

use WWW::Mechanize ();
my $mech = new WWW::Mechanize(autocheck => 1, strict_forms => 1, cookie_jar => {});
use HTTP::CookieJar::LWP ();
my $mech = new WWW::Mechanize(autocheck => 1, strict_forms => 1, cookie_jar => new HTTP::CookieJar::LWP());
$mech->default_header('Accept' => '*/*');
my $origin = $URL;
$origin =~ s#^(.*?//.+?)/.*#$1#;
Expand Down Expand Up @@ -51,7 +52,7 @@
$mech->content() =~ m#<option value="3" selected>ext:group-3</option># or die;


my $dmech = new WWW::Mechanize(autocheck => 1, strict_forms => 1, cookie_jar => {});
my $dmech = new WWW::Mechanize(autocheck => 1, strict_forms => 1, cookie_jar => new HTTP::CookieJar::LWP());
$dmech->default_header('Accept' => '*/*');
$dmech->add_header("Origin" => $origin);
$dmech->get($URL);
Expand Down

0 comments on commit c256b01

Please sign in to comment.