[BUGFIX] [SECURITY] Fixes only logging to .log and.txt filetype extensions.
Backported from master branch. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
committed by
Thomas Hochstein
parent
ce191330c8
commit
63217ef9c9
@ -147,3 +147,4 @@
|
||||
@define('PLUGIN_EVENT_SPAMBLOCK_SPAM', 'Spam');
|
||||
@define('PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM', 'Not spam');
|
||||
|
||||
@define('PLUGIN_EVENT_SPAMBLOCK_LOGFILE_VALIDATE', 'Only file extensions .log and .txt are allowed');
|
||||
|
@ -353,6 +353,8 @@ class serendipity_event_spamblock extends serendipity_event
|
||||
$propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_LOGFILE);
|
||||
$propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_LOGFILE_DESC);
|
||||
$propbag->add('default', $serendipity['serendipityPath'] . 'spamblock-%Y-%m-%d.log');
|
||||
$propbag->add('validate', '@\.(log|txt)$@imsU');
|
||||
$propbag->add('validate_error', PLUGIN_EVENT_SPAMBLOCK_LOGFILE_VALIDATE);
|
||||
break;
|
||||
|
||||
case 'logtype':
|
||||
|
Reference in New Issue
Block a user