Skip to content

Commit

Permalink
Remove diacritics from email
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 2, 2024
1 parent eece4d2 commit bbc1314
Show file tree
Hide file tree
Showing 13 changed files with 934 additions and 1 deletion.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ require (
gomodules.xyz/x v0.0.17
gomodules.xyz/zoom-lib-golang v0.0.0-20230924092137-92156e0a6cc9
google.golang.org/api v0.185.0
gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.3
gopkg.in/macaron.v1 v1.5.0
k8s.io/apimachinery v0.30.1
k8s.io/klog/v2 v2.130.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.3 h1:rz88vn1OH2B9kKorR+QCrcuw6WbizVwahU2Y9Q09xqU=
gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.3/go.mod h1:vJmfdx2L0+30M90zUd0GCjLV14Ip3ZgWR5+MV1qljOo=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
Expand Down
3 changes: 2 additions & 1 deletion pkg/server/issuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"gomodules.xyz/cert"
"gomodules.xyz/cert/certstore"
. "gomodules.xyz/email-providers"
godiacritics "gopkg.in/Regis24GmbH/go-diacritics.v2"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -140,7 +141,7 @@ func CreateLicense(fs blobfs.Interface, certs *certstore.CertStore, info License
sans := AltNames{
DNSNames: []string{cluster},
EmailAddresses: []string{
fmt.Sprintf("%s <%s>", info.Name, info.Email),
fmt.Sprintf("%s <%s>", godiacritics.Normalize(info.Name), info.Email),
info.Email,
},
}
Expand Down
187 changes: 187 additions & 0 deletions vendor/golang.org/x/text/runes/cond.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bbc1314

Please sign in to comment.