Skip to content

Commit 7adc871

Browse files
committed
Enable foreign language anti spam measures
1 parent 6ebf5e3 commit 7adc871

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/Lio/Content/ForeignLanguageSpamDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class ForeignLanguageSpamDetector implements SpamDetector
66
/** @inheritdoc */
77
public function detectsSpam($value)
88
{
9-
return (bool) preg_match("/[일안명빠】]+/iu", $value);
9+
return (bool) preg_match("/[일안명빠에외전나밤】]+/iu", $value);
1010
}
1111
}

app/Lio/ServiceProviders/ContentServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php namespace Lio\ServiceProviders;
22

33
use Illuminate\Support\ServiceProvider;
4+
use Lio\Content\ForeignLanguageSpamDetector;
45
use Lio\Content\PhoneNumberSpamDetector;
56
use Lio\Content\SpamFilter;
67

@@ -11,6 +12,7 @@ public function register()
1112
$this->app->bindShared('Lio\Content\SpamDetector', function () {
1213
return new SpamFilter([
1314
new PhoneNumberSpamDetector(),
15+
new ForeignLanguageSpamDetector(),
1416
]);
1517
});
1618
}

0 commit comments

Comments
 (0)