form/admin: don't allow "+" in username/email

Jellyfin doesn't like this.
This commit is contained in:
Harvey Tindall
2024-08-24 14:21:15 +01:00
parent a7aa3fd53e
commit 6c30a1ff40
9 changed files with 64 additions and 9 deletions
+15
View File
@@ -52,6 +52,14 @@ func lshortfile() string {
return Lshortfile(3)
}
func LshortfileTree() string {
out := ""
for i := 6; i >= 0; i-- {
out += strconv.Itoa(i) + ":" + Lshortfile(i) + " "
}
return out
}
func NewLogger(out io.Writer, prefix string, flag int, color c.Attribute) (l *Logger) {
l = &Logger{}
// Use reimplemented Lshortfile since wrapping the log functions messes them up
@@ -96,6 +104,13 @@ func (l *Logger) PrintfCustomLevel(level int, format string, v ...interface{}) {
l.logger.Print(out)
}
func (l *Logger) PrintfNoFile(format string, v ...interface{}) {
if l.empty {
return
}
l.logger.Print(l.printer.Sprintf(format, v...))
}
func (l *Logger) Print(v ...interface{}) {
if l.empty {
return