Skip to content

Releases: qmgcwlibrary-sketch/libtrack-pro

v2.3.5 — Stable

Choose a tag to compare

@qmgcwlibrary-sketch qmgcwlibrary-sketch released this 17 Aug 05:24
375ccc3

v2.3.5.zip

Changelog

All notable changes to LibTrack Pro — Library Gate Register are documented here.
Format follows Keep a Changelog.


[2.3.5] — 2026-08-17

Security

  • [lgr_scanner] shortcode now requires manage_options — logged-in subscribers can no longer embed and use it to record scans.
  • SVG files explicitly blocked from student photo uploads (only jpeg, png, webp accepted, verified by both MIME type and extension). SVG can carry executable <script> tags.
  • Student search AJAX endpoint rate-limited to 30 requests per 60 s per user via WP transients — prevents subscriber-level database enumeration.
  • Bulk student delete now requires typing DELETE in a confirmation field, enforced at both JS and PHP layers — prevents accidental or CSRF-triggered mass deletions.
  • Backup ZIPs protected from direct web access: .htaccess (Require all denied) and index.php guard written to backup folder on first export.
  • Auto-backup folder path validated against wp_upload_dir() to prevent path traversal via crafted admin settings.
  • Backup restore now verifies plugin identity and schema version before modifying any tables.
  • Scanned card value no longer echoed back in "student not found" error response (removed information disclosure on public kiosk displays).
  • Kiosk tokens now record last_used_at; admin table shows "Last Used" column and highlights tokens silent for 30+ days.
  • All 62 bare echo $var in admin and circulation templates wrapped with esc_html() / esc_attr() / (int) for WP.org output-escaping compliance.

Performance

  • All DATE(scanned_at) WHERE predicates replaced with SARGable scanned_at >= … AND scanned_at <= … range predicates — index is now used on MySQL < 8.0 and all MariaDB versions (33 query sites across 2 files).
  • Added composite indexes idx_student_date(student_id, scanned_at) and idx_gate_date(gate_id, scanned_at) — the two most common access patterns in the logs table. Index migration runs automatically on plugin update.
  • Redundant single-column idx_student and idx_gate indexes dropped; idx_reg(reg_number) added for CSV import duplicate detection.
  • get_summary() collapsed from 9 separate COUNT(*) queries to 3 using SUM(CASE WHEN …) conditional aggregation.
  • get_gate_summary() collapsed from 4 queries to 2.
  • Backup export fetches rows in 500-row chunks (was one unbounded SELECT * per table — OOM risk on large libraries).
  • Backup restore batches REPLACE INTO in groups of 100 rows per query (was one insert per row).

Data Integrity

  • All writes for a single scan (auto-close exit + main log insert) wrapped in a single START TRANSACTION / COMMIT with ROLLBACK on failure.
  • Offline CSV import now transactional with batch commits every 200 rows — partial imports are no longer possible.
  • Bulk CSV import now validates dateofbirth, dateenrolled, and dateexpiry fields before writing; malformed date strings stored as null rather than verbatim.

Added

  • uninstall.php — drops all 11 plugin tables, all options, and all cron events when the plugin is deleted from WP admin.
  • Text domain library-gate-register registered via load_plugin_textdomain() for full i18n/l10n support.
  • languages/ directory for .po/.mo translation files.

Fixed

  • LGR_URL now wrapped with trailingslashit() — prevents double-slash asset URLs on some server configurations.
  • Kiosk offline queue replay JSON parse wrapped in try/catch — a PHP warning bleeding into the response no longer freezes the kiosk UI.
  • Date validation added to date_from / date_to URL parameters in logs and reports pages.

[2.3.4] — 2026-08-17

Performance

  • Replaced all DATE(scanned_at) WHERE predicates with SARGable range predicates.
  • Added composite indexes to lgr_logs with idempotent migration for existing installs.

[2.3.3] — 2026-08-17

Security

  • Backup folder protected from direct web access.
  • Auto-backup path traversal guard (validates folder is inside uploads directory).
  • Backup restore validates plugin identity and schema version.
  • Raw scanned card value removed from "not found" error response.
  • Student search rate-limited.

Data Integrity

  • Scan inserts wrapped in database transaction.
  • Offline CSV import transactional with batch commits.
  • Bulk CSV date field validation.

Performance

  • get_summary() collapsed from 9 queries to 3 using conditional aggregation.
  • get_distinct_categories() capped at 200 results.

[2.3.2] — 2026-08-17

Fixed

  • admin.js now enqueued on frontend — [lgr_scanner] shortcode was completely non-functional on public pages (all scan functions were undefined).
  • Kiosk refresh_nonce now returns lgr_nonce action — nonce mismatch after token refresh caused all subsequent requests to fail.
  • shift field added to scan success response — was always undefined in the result card display.
  • Cooldown clamp raised from 10 s to 60 s — the admin UI allows 0–60 s but the clamp was silently capping at 10 s, and a migration guard was wrongly resetting exactly 10 s back to 3 s.
  • All PHP date() calls replaced with wp_date() / current_time() — affected auto-close timestamps, backup filenames, report defaults, export ranges, and kiosk display labels on servers where the PHP timezone differs from the WordPress site timezone (53 call sites across 6 files).

[2.3.1] — prior release

Initial public working version. See plugin header for earlier history.

LibTrack Pro v2.3.0 — Initial Public Release

Choose a tag to compare

@qmgcwlibrary-sketch qmgcwlibrary-sketch released this 12 Aug 10:45
375ccc3
Add files via upload