Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 904af31

Browse files
committed
Group name is URL encoded by RFC 3986
1 parent 6e1e30f commit 904af31

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Auth/Process/PerunGroups.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ public function process(&$request)
7171
foreach ($groups as $group) {
7272
if (isset($request["SPMetadata"]["groupNameAARC"]) || $this->groupNameAARC) {
7373
# https://aarc-project.eu/wp-content/uploads/2017/11/AARC-JRA1.4A-201710.pdf
74-
# Example: urn:geant:einfra.cesnet.cz:perun.cesnet.cz:group:einfra:<groupName>:<subGroupName>#perun.cesnet.cz
74+
# Group name is URL encoded by RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt)
75+
# Example: urn:geant:einfra.cesnet.cz:perun.cesnet.cz:group:einfra%3A<groupName>%3A<subGroupName>#perun.cesnet.cz
7576
if (empty($this->groupNameAuthority) || empty($this->groupNamePrefix)) {
7677
throw new SimpleSAML_Error_Exception("perun:PerunGroups: missing mandatory configuration options 'groupNameAuthority' or 'groupNamePrefix'.");
7778
}
7879

79-
$groupName = $this->groupNamePrefix . $group->getName() . '#' . $this->groupNameAuthority;
80+
$groupName = $this->groupNamePrefix . rawurlencode($group->getName()) . '#' . $this->groupNameAuthority;
8081
} else {
8182
$groupName = $this->mapGroupName($request, $group->getName());
8283
}

0 commit comments

Comments
 (0)