mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Protection for #371
This commit is contained in:
parent
14fdd4aa32
commit
4def341b66
1 changed files with 8 additions and 0 deletions
|
|
@ -57,6 +57,14 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
&& $this->Config()->Get('plugin', 'email') === $aActionParams['Email']) {
|
||||
$aActionParams['Password'] = $this->Config()->Get('plugin', 'password');
|
||||
}
|
||||
else if ('DoFolderCreate' === $sMethodName || 'DoFolderRename' === $sMethodName) {
|
||||
// Block spam https://github.com/the-djmaze/snappymail/issues/371
|
||||
$latin = transliterator_transliterate('Any-Latin; Latin-ASCII; Lower()', $aActionParams['Folder']);
|
||||
if (false !== \strpos($latin, 'nigger')) {
|
||||
\error_log("blocked {$sMethodName} {$aActionParams['Folder']}");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue