mirror of
https://github.com/usememos/memos.git
synced 2024-11-27 10:52:53 +03:00
310f147911
* Allow single letter user id. They do work - I use one and login using Authelia, but then I am not able to update the profile to update avatar or add comment because "Invalid username: r" errors * Add test for the util with uid matcher * Move the test to separate directory * Use goimports on the test file * Rename the test for a mroe matching name, add failing test * Update the regexp so that two letter work --------- Co-authored-by: Roman Kamyk <roman@kamyk.me>
8 lines
121 B
Go
8 lines
121 B
Go
package util
|
|
|
|
import "regexp"
|
|
|
|
var (
|
|
UIDMatcher = regexp.MustCompile("^[a-zA-Z0-9]([a-zA-Z0-9-]{0,30}[a-zA-Z0-9])?$")
|
|
)
|