Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: removed auto-lower on URLs (OAuth) (#973)

Théo SZANTOf754af7530b8
diff --git a/app/actions/oauth.go b/app/actions/oauth.go
index debeedd16..49b3106aa 100644
--- a/app/actions/oauth.go
+++ b/app/actions/oauth.go
@@ -23,10 +23,10 @@ type CreateEditOAuthConfig struct {
DisplayName string `json:"displayName"`
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
- AuthorizeURL string `json:"authorizeURL" format:"lower"`
- TokenURL string `json:"tokenURL" format:"lower"`
+ AuthorizeURL string `json:"authorizeURL"`
+ TokenURL string `json:"tokenURL"`
Scope string `json:"scope"`
- ProfileURL string `json:"profileURL" format:"lower"`
+ ProfileURL string `json:"profileURL"`
JSONUserIDPath string `json:"jsonUserIDPath"`
JSONUserNamePath string `json:"jsonUserNamePath"`
JSONUserEmailPath string `json:"jsonUserEmailPath"`
diff --git a/app/pkg/validate/general.go b/app/pkg/validate/general.go
index 3f81cb131..ed73963e2 100644
--- a/app/pkg/validate/general.go
+++ b/app/pkg/validate/general.go
@@ -33,8 +33,6 @@ func Email(email string) []string {
//URL validates given URL
func URL(rawurl string) []string {
- rawurl = strings.ToLower(rawurl)
-
if len(rawurl) > 300 {
return []string{"URL address must have less than 300 characters."}
}