mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-26 06:58:26 +01:00
[SECURITY] JSON replies were leaking data for OPs of threads
This commit is contained in:
parent
0482c7918b
commit
5d8bd516e9
@ -103,7 +103,14 @@ class Api {
|
||||
$fields = $threadsPage ? $this->threadsPageFields : $this->postFields;
|
||||
$this->translateFields($fields, $post, $apiPost);
|
||||
|
||||
if ($this->config['poster_ids']) $apiPost['id'] = poster_id($post->ip, $post->thread, $board['uri']);
|
||||
if ($this->config['poster_ids']) {
|
||||
if ($post->thread) {
|
||||
$apiPost['id'] = poster_id($post->ip, $post->thread, $board['uri']);
|
||||
} else {
|
||||
$apiPost['id'] = poster_id($post->ip, $post->id, $board['uri']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($threadsPage) return $apiPost;
|
||||
|
||||
// Handle country field
|
||||
|
Loading…
x
Reference in New Issue
Block a user