From a2a1f9337230e3863b1cee795b2176b43cc70e4f Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sat, 30 Apr 2011 23:25:10 +0200 Subject: [PATCH] GroupMemberCheck: Implement certhash matching. --- group.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/group.go b/group.go index 673dd05..dbd0a76 100644 --- a/group.go +++ b/group.go @@ -189,9 +189,11 @@ func GroupMemberCheck(current *Channel, aclchan *Channel, name string, client *C } return false } else if hash { - // The user is part of this group if the remaining name matches his - // cert hash. - log.Printf("GroupMemberCheck: Implement hash matching") + // The client is part of this group if the remaining name matches the + // client's cert hash. + if strings.ToLower(name) == strings.ToLower(client.CertHash) { + return true + } return false } else if name == "none" { // None