1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

sanitize user provided string for emails

This commit is contained in:
Kyle Spearrin
2017-09-27 12:45:57 -04:00
parent ef354e7083
commit 184fe0cd64
2 changed files with 12 additions and 4 deletions

View File

@ -411,5 +411,12 @@ namespace Bit.Core.Utilities
}
return sb.ToString();
}
public static string SanitizeForEmail(string value)
{
return value.Replace("@", "[at]")
.Replace("http://", string.Empty)
.Replace("https://", string.Empty);
}
}
}