Security notes
- Callback data is untrusted.
- Use
buttons: { params: 'stored' }for tamper-proof params. - Guard pages and dialogues with middlewares.
- Page ids can still be requested directly, so check authorization in a middleware.
- Never put secrets or answers in buttons. Keep them in the session, as the captcha example does.
- Use
- Use
md/htmltemplates for user data. - Dialogue
choicevalues and control buttons are checked against the active dialogue, and buttons from an earlier run are rejected as stale. - In groups, a menu can only be used by the user it was opened for (
buttons.ownerOnly, default on). photostrings are always afile_idor URL. Local files need an explicitnew InputFile(path).collectsteps are capped bymax(default 50).