Releases: qmgcwlibrary-sketch/libtrack-pro
Releases · qmgcwlibrary-sketch/libtrack-pro
Release list
v2.3.5 — Stable
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 requiresmanage_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
DELETEin 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) andindex.phpguard 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 $varin admin and circulation templates wrapped withesc_html()/esc_attr()/(int)for WP.org output-escaping compliance.
Performance
- All
DATE(scanned_at)WHERE predicates replaced with SARGablescanned_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)andidx_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_studentandidx_gateindexes dropped;idx_reg(reg_number)added for CSV import duplicate detection. get_summary()collapsed from 9 separateCOUNT(*)queries to 3 usingSUM(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 INTOin 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/COMMITwithROLLBACKon 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, anddateexpiryfields before writing; malformed date strings stored asnullrather 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-registerregistered viaload_plugin_textdomain()for full i18n/l10n support. languages/directory for.po/.motranslation files.
Fixed
LGR_URLnow wrapped withtrailingslashit()— 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_toURL 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_logswith 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.jsnow enqueued on frontend —[lgr_scanner]shortcode was completely non-functional on public pages (all scan functions were undefined).- Kiosk
refresh_noncenow returnslgr_nonceaction — nonce mismatch after token refresh caused all subsequent requests to fail. shiftfield added to scan success response — was alwaysundefinedin 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 withwp_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
Add files via upload