1
0

[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:
Garvin Hicking
2019-09-17 10:50:28 +02:00
committed by Thomas Hochstein
parent ce191330c8
commit 63217ef9c9
3 changed files with 6 additions and 1 deletions

View File

@ -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');

View File

@ -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':