Skip to content

Commit 3a818c2

Browse files
committed
Rebase on latest master
1 parent 3c8953d commit 3a818c2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/www/LoginIntegrationTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function testValidTicketNameOverride()
218218
CURLOPT_COOKIEFILE => $this->cookies_file
219219
]
220220
);
221-
$this->assertEquals(302, $resp['code']);
221+
$this->assertEquals(302, $resp['code'], $resp['body']);
222222

223223
$this->assertStringStartsWith(
224224
$service_url . '?myTicket=ST-',
@@ -232,6 +232,9 @@ public function testValidTicketNameOverride()
232232
* urls or encode a space in a different way then SSP will in a redirect. This workaround
233233
* is to allow those clients to work
234234
* @dataProvider buggyClientProvider
235+
* @param string $service_url The service url submitted by the client
236+
* @param string $expectedStartsWith The redirect location is expected to start with this.
237+
* @param string $expectedEndsWith The redirect location is expected to end with this. Used for testing #fragments.
235238
* @return void
236239
*/
237240
public function testBuggyClientBadUrlEncodingWorkAround($service_url, $expectedStartsWith, $expectedEndsWith)

www/login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@
224224
}
225225
} elseif ($redirect) {
226226
if ($casconfig->getBoolean('noReencode', false)) {
227-
$redirectUrl = casAddURLParameters($_GET['service'], $parameters);
227+
$redirectUrl = casAddURLParameters($serviceUrl, $parameters);
228228
HTTP::redirectTrustedURL($redirectUrl);
229229
} else {
230-
HTTP::redirectTrustedURL(HTTP::addURLParameters($_GET['service'], $parameters));
230+
HTTP::redirectTrustedURL(HTTP::addURLParameters($serviceUrl, $parameters));
231231
}
232232
} else {
233233
HTTP::submitPOSTData($serviceUrl, $parameters);

0 commit comments

Comments
 (0)