diff --git a/src/.htaccess b/src/.htaccess deleted file mode 100644 index 36b5b0b..0000000 --- a/src/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine on -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA] diff --git a/src/web/responses/responses.go b/src/web/responses/responses.go index d0cc973..5422c64 100644 --- a/src/web/responses/responses.go +++ b/src/web/responses/responses.go @@ -85,13 +85,13 @@ func parseUsername(svc Service) string { if svc.UsernameIsFQDN && !svc.RequireLocalDomain{ return email } else if svc.UsernameIsFQDN && svc.RequireLocalDomain { - re := regexp.MustCompile(`[^@]+$`) + re := regexp.MustCompile(`[^@(%40)]+$`) domain := re.FindString(email) localemail := strings.Replace(email, domain, global.MainConfig.LocalDomain,1) return localemail } else { - re := regexp.MustCompile(`^[^@]+`) + re := regexp.MustCompile(`^[^@(%40)]+`) username := re.FindString(email) return username }