Files
2026-09-06 20:14:05 +03:00

5.3 KiB

v0.40.3

  • Write the status header for JSON responses only if the fields picker succeed or has acceptable fallback. This is to allow custom response status code for failed json writes.

  • Fixed collection index validator to allow expressions with parenthesis in the optional WHERE clause.

  • Clamped arccosine to [-1,1] in the Harvesine formula for the geoDistance() filter function to workaround edge case related to float rounding errors for some coordinates.

  • Prevent unnecessary body chunk read if we already known that we are beyond the allowed limit.

  • Updated the json field validator to check the encoding/json/v2 semantics and allow duplicated keys on record marshalize for compliance with old jsonv1 data.

  • Fixed nested cascade delete of self-referenced relation records.

  • Minor UI fixes (updated dark primary btn color contrast, force reload the records list if the deleted record has self-referenced cascade relation field, etc.).

  • Changed JSVM $app variable definition from TS type to interface (#7834).

  • Bumped golang.org/x/* dependencies to silence security scanners (#7829).

v0.40.2

  • Return an error when filter params fallback fails to json serialize and optimized params replacement to execute in a single pass.

  • Fixed collection index parsing error for indexes with missing name.

  • Minor UI autocomplete optimizations (prefix match, autocomplete debounce, etc.).

  • Fixed linter warnings and comment typos.

  • Bumped goja and its related dependencies (regex unescaped dash error fix and base64 optimizations).

  • Bumped the min Go GitHub action version to 1.27.1 as it includes some minor database/sql and enconding/json/v2 bug fixes.

v0.40.1

  • Fixes for some reported regressions related to the encoding/json/v2 update:
    • allow mangling invalid UTF8 characters when serializing json data (#7814)
    • fixed OAuth2 providers config merge incorrectly replacing the entire slice (#7815)

v0.40.0

  • Propagate console command errors and recovered panics to app.Start() so that the program can exit with non-zero code while still ensuring that app.OnTerminate hook was triggered (responsible for the app graceful shutdown handling). ⚠️ Note that this could be a slight breaking change in case you are chaining PocketBase commands and relied on the previous 0 exit status for Command.RunE returned errors. Or in other words, if you have ./pocketbase invalid && someothercommand and previously relied that someothercommand will be always executed then this is no longer the case and you'll have to adjust it or replace && with ;.

  • Added quotes around the default Content-Disposition serving filename in case custom name with special characters is provided.

  • Added Cross-Origin-Opener-Policy:same-origin to the default security response headers. This is an extra precaution to prevent tab-nabbing in case custom UI plugins use target="_blank" without rel="noopener".

  • Added Record.GetInt64(field) helper (note that the serializable max safe integer of the number field is ~2^53-1).

  • Added Store.Keys() method that returns a slice with all of the store keys.

  • Added new DELETE /api/logs endpoint and UI control to delete all logs without changing the maxDays retention setting.

  • Added new log settings option to limit the max Log.Data size that will be saved in the database (default to ~16KB). This is an extra precaution for the cases when logging user supplied data without validating it beforehand. If the resulting Log.Data json is above the limit, it is truncated to the last valid decoded character and an extra "__pb_truncated__":true log data entry will be added.` Additionally, for just in case the log message is also truncated at max 8k characters.

  • Added new filesystem low-level helper methods:

    • filesystem.NewWriter(key, opts) to allow direct file create from an io.Reader value.
    • filesystem.OnNewWriter() hook to allow listening for new/to-be-created files (it is not exposed in core.App instance for now to avoid introducing breaking changes).
    • filesystem.OnDelete() hook to allow listening for deleted files (it is not exposed in core.App instance for now to avoid introducing breaking changes).
  • Optimized backups to no longer transaction lock the database during backup generation (#7799).

  • Updated modernc.org/sqlite to 1.57.0 and registered by default the new _defensive=1 DSN query parameter to enable SQLite's defensive mode.

  • Bumped the min Go version to 1.27.0 and migrated to the new encoding/json/v2 package. ⚠️ Please note that Go 1.27.0 retrofitted encoding/json to use the v2 package under the hood but unfortunately is not fully backward compatible. I recommend to not push blindly an update on production and to test your PocketBase application first locally to see if everything works correctly.