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

Commit 3d5da36

Browse files
committed
Fixed url encoding in PerunGroups
1 parent 21b9782 commit 3d5da36

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77

88
[Fixed]
99
- Fixed resend SPMetadata from request to unauthorized-access-go-to-registration page
10+
- Fixed url encoding in PerunGroups
1011

1112
## [v2.0.0]
1213
[Added]

lib/Auth/Process/PerunGroups.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ public function process(&$request)
7272
if (isset($request["SPMetadata"]["groupNameAARC"]) || $this->groupNameAARC) {
7373
# https://aarc-project.eu/wp-content/uploads/2017/11/AARC-JRA1.4A-201710.pdf
7474
# 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
75+
# Example: urn:geant:einfra.cesnet.cz:perun.cesnet.cz:group:einfra:<groupName>:<subGroupName>#perun.cesnet.cz
7676
if (empty($this->groupNameAuthority) || empty($this->groupNamePrefix)) {
7777
throw new SimpleSAML_Error_Exception("perun:PerunGroups: missing mandatory configuration options 'groupNameAuthority' or 'groupNamePrefix'.");
7878
}
7979

80-
$groupName = $this->groupNamePrefix . rawurlencode($group->getUniqueName()) . '#' . $this->groupNameAuthority;
80+
$groupName = $this->groupNamePrefix . implode(":", array_map("rawurlencode", explode(":", $group->getUniqueName()))) . '#' . $this->groupNameAuthority;
8181
} else {
8282
$groupName = $this->mapGroupName($request, $group->getUniqueName());
8383
}

0 commit comments

Comments
 (0)