Repository navigation
Releases
Releases · dxcufgb/FoundryVTT-discord-integration
v1.7.0
Added
- Add or remove dates of an open planning poll. A new Edit dates button under the poll lets the campaign's DM, members of the game master role (
/gm-role) and server administrators change the candidate dates after the poll is posted: a private menu shows the poll's dates already selected next to the upcoming days. Votes for removed dates are dropped, and the poll message is updated without tagging anyone again.
v1.6.6
Changed
- A world opened early still tells the players when the session is near. When the campaign's world is already running 30 minutes before a planned session, the "world is ready to join" message (which tags the players) is now sent at that point. Before, a world opened more than 30 minutes ahead never sent it. It goes out once per session, and not again if the world was started within the 30 minutes.
v1.6.5
Security
- The administration page's plain-HTTP redirect no longer trusts the Host header. A plain-HTTP request on the HTTPS port is redirected to
https://only for a host name the page accepts anyway (ADMIN_HOSTS,localhost, this machine's names and addresses); any other name gets "400 use https://" instead of a redirect to that name. - A crafted checksum file can no longer stall the auto-updater. Reading
SHA256SUMS.txttook seconds per line on a line with a long run of spaces; it is now linear. npm run check-configno longer keeps its "password set / not set" note in a variable named like a password, so code scanning does not report it as a logged secret (the hash was never printed).
v1.6.4
Changed
- Opening a world only pings the players when a session is about to start. The "world is ready to join" message, which tags every player of the campaigns bound to the world, is now sent only when the campaign's next session starts within 30 minutes or is already under way. Opening the world at any other time (preparation, testing) no longer pings anyone; the plain "World started" announcement is unchanged.
v1.6.3
Security
- A flood of failed logins can no longer lock the administrator out of the administration page. After 50 failed logins from any addresses within 15 minutes the page refused every login, including the right password, so anyone who could reach the port could keep the real administrator out. Wrong passwords are still refused during such a flood and an address is still locked out for five minutes after five wrong passwords, but the right password now always gets in.
- Manifest lookups stay off the local network. When foundryvtt.com does not know an installed package, the bot fetches the
manifestURL from the package'smodule.json. A package could point that at a local, private or cloud-metadata address (localhost,10.x,192.168.x,169.254.169.254, …); such URLs are now skipped. - World ids are checked before they become a path. Looking up a world's title refuses an id that is
.,..or contains anything but letters, digits,.,-and_, so an id can never point outsideData/worlds. - The LevelDB reader refuses absurd block sizes. A damaged or crafted world database that declares a compressed block of more than 128 MB is reported as unreadable instead of the bot trying to allocate that memory.
Added
- The administration page has a logo and a favicon. The d20 icon is shown at the top left on every view, the login screen included, on the login card and as the browser tab's icon. The same icon is in
assets/icon.png; the README explains how to use it as the bot's avatar.
v1.6.2
Security
- undici updated to 6.29.1. undici is the HTTP client discord.js uses to talk to Discord. 6.29.0, which 1.6.1 and older install, has two high-severity denial-of-service bugs: unbounded memory use in its EventSource parser (GHSA-4qv8-2p9j-2685) and an unhandled error on a response with too many content encodings (GHSA-xjj6-f33q-929c). Nothing else changes.
v1.6.1
Security
- Ids that are names of
Object.prototypeno longer reach it. Campaign, poll, server and other ids are looked up only among the stored ones (Object.hasOwn), so/campaign join campaign:__proto__no longer crashes the command,/campaign edit campaign:constructor …no longer saves a broken campaign, and no id can changeObject.prototype. A__proto__id is refused when saving, and a__proto__key instate.json(which the bot never writes) is ignored on loading. Existingstate.jsonfiles load and save exactly as before. - The auto-updaters no longer write through links in the bot's data folder. The data folder belongs to the bot's account, which could replace
update-notice.jsonwith a link to any file or folder, and the root (Linux) or SYSTEM (Windows) updater copied the release notes through it. The notes now go into a new file under a random name that is then renamed overupdate-notice.json(a rename replaces a link, not what it points at); a data folder that is itself a link, or (Linux) not owned by the bot's user, gets no notes. The Linux installer no longer follows links indata/when it gives the folder to the bot's user, and refuses an.envordatathat is a symlink. - Windows:
.envand the data folder are private. Up to now setup.exe let every local user changedata\(state.json, andadmin.jsonwith the administration page's password hash) and.env(the Discord token) inherited read access for Users fromC:\ProgramData. The newdeploy\windows\protect-config.ps1, run by setup.exe before it writes.env, byinstall-task.ps1and by every auto-update run (so existing installations are fixed by the upgrade), gives them explicit, non-inherited permissions:.envAdministrators and SYSTEM full control and the bot task's account read;data\Administrators and SYSTEM full control and the bot task's account modify; the settings folder itself (logs, updater token) Administrators and SYSTEM only. Users, Everyone and Authenticated Users get nothing. Edit configuration, Check configuration and Run bot in a window now ask for administrator rights.
Changed
- Linux installer: Node.js is installed only on a real yes. When Node.js is missing or too old and there is no terminal to ask (and no
--yes), the installer now stops and says to install Node.js 20+ or run it again with--yes, instead of taking the default answer and running NodeSource's setup script as root. With a terminal it still asks;--yesstill installs Node.js 22. It also no longer mistakes a/dev/ttythat cannot be opened (no controlling terminal, as under cron orsetsid) for a terminal, where a failed read counted as the default answer to every question.
v1.6.0
Added
- Administration page: edit channels and roles. The Servers and campaigns page now changes each server's channel for every message type, the role pinged on unexpected downtime and the game master role, and each campaign's channel and voice channel, picked from the server's channels and roles. These are the same settings as
/channel,/gm-roleand/campaign edit. Saving warns, like those commands, when the bot lacks a permission in the chosen channel. A channel that was deleted in Discord stays selected until it is changed.
v1.5.0
Added
- Session summaries. When a Foundry world goes back to setup, the bot posts that world's session summary, written by the Foundry module dxcufgbs-session-summary, to the channel of every campaign bound to the world. Only sessions that ended within the last 24 hours, never a mid-session export, each one once per channel (a failed post is retried the next time the world stops), oldest first. A campaign without a channel gets nothing. Works with world announcements turned off. The new optional
SESSION_SUMMARY_DIRpoints at the module's folder if it is notsession-summariesin Foundry's Data folder;npm run check-configreports whether it exists. Without the module the bot works exactly as before. - Administration page (optional, off by default), like the ones of the Foundry world backup and the release proxy: a password-protected HTTPS page on its own port (
ADMIN_PORT) with an overview of Foundry, Discord and the configuration, the monitoring switches, every server's channels and campaigns, the session summary settings (on/off, age limit, recent summaries, Post now) and the admin password. Set the password withnpm run admin-password. See Administration page.
v1.4.2
What's Changed
- Session events in voice channels, and name exactly which permission the bot lacks by @dxcufgb in #22
Full Changelog: v1.4.1...v1.4.2