mirror of
https://github.com/restic/rest-server.git
synced 2026-09-25 21:41:25 -07:00
Allow numbers in htpasswd usernames
This commit is contained in:
@@ -13,4 +13,5 @@ curl -v -X DELETE -u foo/config:attack http://localhost:8000/foo/config
|
|||||||
|
|
||||||
https://github.com/restic/rest-server/issues/131
|
https://github.com/restic/rest-server/issues/131
|
||||||
https://github.com/restic/rest-server/pull/132
|
https://github.com/restic/rest-server/pull/132
|
||||||
|
https://github.com/restic/rest-server/pull/137
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@ func (h *HtpasswdFile) throttleTimer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var validUsernameRegexp = regexp.MustCompile(`^[\p{L}@.-]+$`)
|
var validUsernameRegexp = regexp.MustCompile(`^[\p{L}\d@.-]+$`)
|
||||||
|
|
||||||
// Reload reloads the htpasswd file. If the reload fails, the Users map is not changed and the error is returned.
|
// Reload reloads the htpasswd file. If the reload fails, the Users map is not changed and the error is returned.
|
||||||
func (h *HtpasswdFile) Reload() error {
|
func (h *HtpasswdFile) Reload() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user