mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
poll widget: Prevent question updates from non-authors.
We now ignore question edits if the sender of the submessage is not the message author. The webapp UI prevents folks from editing the question for somebody else's poll, but a determined person could use our low level API to do it. We will add safeguards on the server side for this, but this change is sufficient to protect the webapp (and mobile when they upgrade the library).
This commit is contained in:
@@ -15,6 +15,7 @@ export function activate({
|
||||
}) {
|
||||
const is_my_poll = people.is_my_user_id(message.sender_id);
|
||||
const poll_data = new PollData({
|
||||
message_sender_id: message.sender_id,
|
||||
current_user_id: people.my_current_user_id(),
|
||||
is_my_poll,
|
||||
question,
|
||||
|
||||
Reference in New Issue
Block a user