Skip to content
Snippets Groups Projects
Commit 2ef04be0 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch...

Merge branch 'hotline#79470_mise_en_place_des_sets_bibiondemand_mauvais_encodage_d_urls' into 'hotline'

hotline #79470 BiblioOnDemand : fix SSO URLs encoding

See merge request !3746
parents d75a2833 2696f996
Branches
Tags
2 merge requests!3764Hotline,!3746hotline #79470 BiblioOnDemand : fix SSO URLs encoding
Pipeline #11749 passed with stage
in 54 minutes and 11 seconds
- ticket #79470 : Bibiondemand : correction de l'encodage des URLs SSO
\ No newline at end of file
......@@ -61,7 +61,7 @@ class Bibliondemand_Config extends Class_DigitalResource_Config {
$url = Class_AdminVar::getValueOrDefault($this->withNameSpace('SSO_URL'));
return ($record_url = (new Class_Notice_Sso($record))->getFirstPrivateUrl())
? $url . '&' . http_build_query(['returnUrl' => '/sarasvati/ws/secure/redirect.ashx?url=' . $record_url])
? $url . '&' . http_build_query(['returnUrl' => '/sarasvati/ws/secure/redirect.ashx?url=' . urlencode($record_url)])
: $url;
}
......
......@@ -172,7 +172,7 @@ class ModulesControllerBibliondemandSsoTest extends AbstractControllerTestCase {
/** @test */
public function record21ShouldRedirectToBibliondemandSso() {
$this->dispatch('/modules/sso/id/21', true);
$this->assertXPathContentContains('//script', 'document.location.href="http://numerique-pasdecalais.bibliondemand.com/logon.aspx?provider=SsoCas&sso-id=cg62-saintomer&returnUrl='. urlencode('/sarasvati/ws/secure/redirect.ashx?url=http://music.1dtouch.com/users/auth/assa?dest=albums/137962&bibid=CG62').'"',
$this->assertXPathContentContains('//script', 'document.location.href="http://numerique-pasdecalais.bibliondemand.com/logon.aspx?provider=SsoCas&sso-id=cg62-saintomer&returnUrl='. urlencode('/sarasvati/ws/secure/redirect.ashx?url=' . urlencode('http://music.1dtouch.com/users/auth/assa?dest=albums/137962&bibid=CG62')).'"',
$this->_response->getBody());
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment