security issue

This commit is contained in:
Maryana Rozhankivska
2014-07-24 16:48:41 +03:00
parent 6da20812ce
commit 7dd8b5026d
2 changed files with 45 additions and 42 deletions

View File

@ -750,8 +750,8 @@ class Poche
die(sprintf(_('User with this id (%d) does not exist.'), $user_id));
}
if (!in_array($type, $allowed_types) || $token != $config['token']) {
die(_('Uh, there is a problem while generating feeds.'));
if (!in_array($type, $allowed_types) || !isset($config['token']) || $token != $config['token']) {
die(_('Uh, there is a problem while generating feed. Wrong token used?'));
}
$feed = new FeedWriter(RSS2);