mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v4.0.0-alp
			...
			e114bf0943
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					e114bf0943 | ||
| 
						 | 
					c9867ccb76 | 
@@ -70,7 +70,7 @@ var VerifyCmd = &cobra.Command{
 | 
			
		||||
 | 
			
		||||
		err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(iPassword))
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			log.Fatal().Msg("Ppassword is incorrect")
 | 
			
		||||
			log.Fatal().Msg("Password is incorrect")
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if user.TotpSecret == "" {
 | 
			
		||||
 
 | 
			
		||||
@@ -18,10 +18,10 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
 | 
			
		||||
 | 
			
		||||
		finalKey = append(finalKey, rootName)
 | 
			
		||||
		finalKey = append(finalKey, "providers")
 | 
			
		||||
		cebabKey := strings.ToLower(k)
 | 
			
		||||
		kebabKey := strings.ToLower(k)
 | 
			
		||||
 | 
			
		||||
		for _, known := range knownKeys {
 | 
			
		||||
			if strings.HasSuffix(cebabKey, strings.ReplaceAll(known, "-", sep)) {
 | 
			
		||||
			if strings.HasSuffix(kebabKey, strings.ReplaceAll(known, "-", sep)) {
 | 
			
		||||
				suffix = known
 | 
			
		||||
				break
 | 
			
		||||
			}
 | 
			
		||||
@@ -31,7 +31,7 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		clientNameParts := strings.Split(strings.TrimPrefix(strings.TrimSuffix(cebabKey, sep+strings.ReplaceAll(suffix, "-", sep)), "providers"+sep), sep)
 | 
			
		||||
		clientNameParts := strings.Split(strings.TrimPrefix(strings.TrimSuffix(kebabKey, sep+strings.ReplaceAll(suffix, "-", sep)), "providers"+sep), sep)
 | 
			
		||||
 | 
			
		||||
		for i, p := range clientNameParts {
 | 
			
		||||
			if i == 0 {
 | 
			
		||||
@@ -46,9 +46,9 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
 | 
			
		||||
 | 
			
		||||
		finalKey = append(finalKey, camelClientName)
 | 
			
		||||
 | 
			
		||||
		filedParts := strings.Split(suffix, "-")
 | 
			
		||||
		fieldParts := strings.Split(suffix, "-")
 | 
			
		||||
 | 
			
		||||
		for i, p := range filedParts {
 | 
			
		||||
		for i, p := range fieldParts {
 | 
			
		||||
			if i == 0 {
 | 
			
		||||
				camelField += p
 | 
			
		||||
				continue
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user