mirror of
				https://github.com/elyby/chrly.git
				synced 2025-05-31 14:11:51 +05:30 
			
		
		
		
	Update mojang api username filter
This commit is contained in:
		| @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | ||||
|   - Counters: | ||||
|     - `ely.skinsystem.{hostname}.app.profiles.request` | ||||
|  | ||||
| ### Fixed | ||||
| - Adjusted Mojang usernames filter to be stickier according to their docs | ||||
|  | ||||
| ### Changed | ||||
| - Bumped Go version to 1.21. | ||||
|  | ||||
|   | ||||
| @@ -60,8 +60,8 @@ func (c *broadcaster) BroadcastAndRemove(username string, result *broadcastResul | ||||
| 	delete(c.listeners, username) | ||||
| } | ||||
|  | ||||
| // https://help.mojang.com/customer/portal/articles/928638 | ||||
| var allowedUsernamesRegex = regexp.MustCompile(`^[\w_]{3,16}$`) | ||||
| // https://help.minecraft.net/hc/en-us/articles/4408950195341#h_01GE5JX1Z0CZ833A7S54Y195KV | ||||
| var allowedUsernamesRegex = regexp.MustCompile(`(?i)^[0-9a-z_]{3,16}$`) | ||||
|  | ||||
| type UUIDsProvider interface { | ||||
| 	GetUuid(username string) (*mojang.ProfileInfo, error) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user