Skip to content
Snippets Groups Projects
Commit 81f9a7c5 authored by Olav Morken's avatar Olav Morken
Browse files

consent: Reintroduce %SPENTITYID% replacement in privacy policy URL.

Fixes issue 241.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2134 44740490-163a-0410-bde0-09ae8108e29a
parent d6f2daf3
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,8 @@ Common options ...@@ -56,6 +56,8 @@ Common options
`privacypolicy` `privacypolicy`
: This is an absolute URL for where an user can find a : This is an absolute URL for where an user can find a
privacypolicy. If set, this will be shown on the consent page. privacypolicy. If set, this will be shown on the consent page.
`%SPENTITYID%` in the URL will be replaced with the entity id of
the service the user is accessing.
: Note that this option also exists in the SP-remote metadata, and : Note that this option also exists in the SP-remote metadata, and
any value in the SP-remote metadata overrides the one configured any value in the SP-remote metadata overrides the one configured
......
...@@ -58,6 +58,8 @@ and Shibboleth 1.3 protocol: ...@@ -58,6 +58,8 @@ and Shibboleth 1.3 protocol:
`privacypolicy` `privacypolicy`
: This is an absolute URL for where an user can find a privacypolicy : This is an absolute URL for where an user can find a privacypolicy
for this SP. If set, this will be shown on the consent page. for this SP. If set, this will be shown on the consent page.
`%SPENTITYID%` in the URL will be replaced with the entity id of
this service provider.
: Note that this option also exists in the IdP-hosted metadata. This : Note that this option also exists in the IdP-hosted metadata. This
entry in the SP-remote metadata overrides the option in the entry in the SP-remote metadata overrides the option in the
......
...@@ -124,6 +124,10 @@ if (array_key_exists('privacypolicy', $state['Destination'])) { ...@@ -124,6 +124,10 @@ if (array_key_exists('privacypolicy', $state['Destination'])) {
} else { } else {
$privacypolicy = FALSE; $privacypolicy = FALSE;
} }
if($privacypolicy !== FALSE) {
$privacypolicy = str_replace('%SPENTITYID%', urlencode($spentityid),
$privacypolicy);
}
$t->data['sppp'] = $privacypolicy; $t->data['sppp'] = $privacypolicy;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment