corrected incorrect regex
This commit is contained in:
parent
0064740c13
commit
ac79db5f66
2 changed files with 2 additions and 6 deletions
|
@ -1,4 +0,0 @@
|
||||||
RewriteEngine on
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]
|
|
|
@ -85,13 +85,13 @@ func parseUsername(svc Service) string {
|
||||||
if svc.UsernameIsFQDN && !svc.RequireLocalDomain{
|
if svc.UsernameIsFQDN && !svc.RequireLocalDomain{
|
||||||
return email
|
return email
|
||||||
} else if svc.UsernameIsFQDN && svc.RequireLocalDomain {
|
} else if svc.UsernameIsFQDN && svc.RequireLocalDomain {
|
||||||
re := regexp.MustCompile(`[^@]+$`)
|
re := regexp.MustCompile(`[^@(%40)]+$`)
|
||||||
domain := re.FindString(email)
|
domain := re.FindString(email)
|
||||||
localemail := strings.Replace(email, domain,
|
localemail := strings.Replace(email, domain,
|
||||||
global.MainConfig.LocalDomain,1)
|
global.MainConfig.LocalDomain,1)
|
||||||
return localemail
|
return localemail
|
||||||
} else {
|
} else {
|
||||||
re := regexp.MustCompile(`^[^@]+`)
|
re := regexp.MustCompile(`^[^@(%40)]+`)
|
||||||
username := re.FindString(email)
|
username := re.FindString(email)
|
||||||
return username
|
return username
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue