github bscott/subtrackr v0.7.1
v0.7.1 - JSON API bodies, configurable exchange-rate source and restore fixes

one hour ago

What's New

Choose your exchange-rate source (#165)

  • New optional FIXER_API_URL points SubTrackr at any endpoint that answers in Fixer's latest format, with or without FIXER_API_KEY. Fixer.io stays the default.
  • Settings → Currency shows where exchange rates come from and how to change the source. The tooltip on each converted amount names its source.
  • Sources that publish once per business day (such as ECB reference rates) are not flagged as out of date over the weekend.
  • See Using another rate source in the README.

Thanks to @cahthuranag for the contribution.

JSON request bodies on the API (#163)

  • POST /api/v1/subscriptions and PUT /api/v1/subscriptions/:id accept JSON bodies as well as form data.
  • JSON request bodies are capped at 1 MB (larger bodies get 413).
  • A subscription fetched with GET can be sent back with PUT unchanged. tags may be a comma-separated string, a list of names, or the tag objects GET returns, and are matched by name. Dates accept YYYY-MM-DD or the timestamp GET returns.

Thanks to @jayhemnani9910 for the contribution.

Fixes

Restoring a backup keeps the right tags (#167)

  • Restored subscriptions are tagged by tag name. Before, tags were linked by the tag ids in the backup, which belong to the instance the backup came from, so a subscription could come back with the wrong tag (for example work restored as personal) or lose a tag.

Thanks to @jayhemnani9910 for the contribution.

Security and Reliability

  • Exchange-rate refreshes no longer follow redirects, so the API key cannot reach another host.
  • The API key and any credentials in FIXER_API_URL are kept out of logs, error messages and the database.
  • An invalid FIXER_API_URL disables conversion instead of sending the key to Fixer.io.
  • Responses from the rate source are validated: EUR base, a timestamp not in the future, a 1 MB size cap, and plausible rates only.
  • Switching sources replaces the old source's cached rates, and each source has its own daily refresh limit.

Technical Changes

  • Corrected the JSON API examples in the README.
  • Subscriptions are never linked to tags by id when created; tags are always attached by name.
  • New tests: backup → restore across instances with different tag ids, a GET → PUT round trip through the API, response fixtures, a fuzz test of the rate response parser, cross-rate consistency, a credential-leak sweep, the configuration matrix, upgrade compatibility with v0.7.0, and template escaping.

Don't miss a new subtrackr release

NewReleases is sending notifications on new releases.