Repository navigation
Commit c9bbe67
fix: only act on a panel message the caller is entitled to
Telegram lets a client send any callback data for any message it can see, not
only the buttons it was shown. The owner id inside the callback data stops one
person driving another's panel, but it does not stop somebody forging their own
id against a message that was never a panel.
In a group, Voicy's public messages are transcripts somebody asked for and
everyone can read. A crafted callback naming one of them could delete it, or
overwrite it with a settings screen.
An ephemeral message stays addressable: it is already visible to exactly one
person, so acting on it at that person's request destroys nothing that was not
theirs. In a direct chat every message is that person's own, so the panel is
still edited in place.
This is the hole branchy closed in the same release. It was not introduced
here, but shipping one bot with the guard and its sibling without it is not a
choice worth making by accident.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxNv1rk7jMQtb9tMBREc5B1 parent 384bec6 commit c9bbe67
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
711 | 730 | | |
712 | 731 | | |
713 | 732 | | |
714 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
715 | 737 | | |
716 | 738 | | |
717 | 739 | | |
718 | 740 | | |
719 | 741 | | |
720 | 742 | | |
721 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
722 | 747 | | |
723 | 748 | | |
724 | 749 | | |
| |||
0 commit comments