Skip to content

Commit

Permalink
remove canonical form check for content filters as it's...hm...not good
Browse files Browse the repository at this point in the history
  • Loading branch information
13xforever committed Jul 21, 2021
1 parent 14d47af commit d5343fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CompatBot/Database/Providers/ContentFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal static class ContentFilter

if (result is null && ctx == FilterContext.Chat)
{
str = str.StripInvisibleAndDiacritics().ToCanonicalForm();
str = str.StripInvisibleAndDiacritics();
matcher?.ParseText(str, h =>
{
if (string.IsNullOrEmpty(h.Value.ValidatingRegex) || Regex.IsMatch(str, h.Value.ValidatingRegex, RegexOptions.IgnoreCase | RegexOptions.Multiline))
Expand Down
2 changes: 2 additions & 0 deletions CompatBot/Utils/OpenSslConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public static async Task CheckAndFixSystemConfigAsync()
stream = File.Open(configPath, FileMode.Open, FileAccess.ReadWrite, FileShare.Read);
using var reader = new StreamReader(stream, Encoding.UTF8, leaveOpen: true);
content = await reader.ReadToEndAsync().ConfigureAwait(false);
#if DEBUG
Config.Log.Debug("openssl.cnf content:\n" + content);
#endif
if (content.Contains("CipherString") && content.Contains("\nopenssl_conf"))
{
Config.Log.Debug("No need to configure");
Expand Down

0 comments on commit d5343fc

Please sign in to comment.