Skip to content

Commit

Permalink
Enable foreign language anti spam measures
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed May 5, 2015
1 parent 6ebf5e3 commit 7adc871
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Lio/Content/ForeignLanguageSpamDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class ForeignLanguageSpamDetector implements SpamDetector
/** @inheritdoc */
public function detectsSpam($value)
{
return (bool) preg_match("/[일안명빠】]+/iu", $value);
return (bool) preg_match("/[일안명빠에외전나밤】]+/iu", $value);
}
}
2 changes: 2 additions & 0 deletions app/Lio/ServiceProviders/ContentServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php namespace Lio\ServiceProviders;

use Illuminate\Support\ServiceProvider;
use Lio\Content\ForeignLanguageSpamDetector;
use Lio\Content\PhoneNumberSpamDetector;
use Lio\Content\SpamFilter;

Expand All @@ -11,6 +12,7 @@ public function register()
$this->app->bindShared('Lio\Content\SpamDetector', function () {
return new SpamFilter([
new PhoneNumberSpamDetector(),
new ForeignLanguageSpamDetector(),
]);
});
}
Expand Down

0 comments on commit 7adc871

Please sign in to comment.