Skip to content

Releases

v1.5.0

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 26 Oct 00:50

v1.5.0 (October 25, 2026)

Admin

  • New setting: reverse proxies in front of this server (Settings → Network, 0–10). Client IPs
    are now read from the right of X-Forwarded-For by hop count, so a client can no longer spoof
    the IP recorded on punches, used by login/API throttles, or written to audit logs. Shows what
    the server currently sees for your request. Unset = 0 (headers ignored); if TRUSTED_PROXIES
    is set in .env and the setting has not been saved, 1 is assumed.

Security

  • Dependencies updated: phpmailer 7.1.1 (major), firebase/php-jwt 7.2.1, phpspreadsheet 5.10.0,
    phpdotenv 5.7.0 plus transitive packages. composer audit is clean. Composer 2.10 is needed
    to audit under PHP 8.5.
  • nginx hardening (see the sample config): PHP can no longer execute from uploads/, images/,
    cache/, auth/, css/ or js/; api/{lib,middleware,services,auth}/ and api/**/*.md
    are not served; *.txt, the cron script and the unreferenced legacy clock_handler.php
    (unauthenticated SQL injection) are blocked; HSTS added.
  • A full security audit produced follow-up issues #39–#45 (PIN throttling, punch-time
    integrity, XSS, CSRF, API hardening). They are not fixed in this release.

Build & CI

  • New CI workflow: php -l on every file, composer audit, weekly scheduled audit.
  • Dependabot security alerts and security updates enabled.

v1.4.0

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 25 Aug 20:42

External Write API (shipped reserved — not yet active)

New POST/PATCH handlers on api/external/v1/{punches,timeoff,employees}.php, gated by three new scopes: punches:write, timeoff:write, employees:write. The code is complete, adversarially reviewed, and verified against the live database — but the scopes ship available => false, and that flag is now genuinely enforced at authorization time, not just described in the admin UI's copy. A key already holding one of these scope strings gets the same 403 as a key that was never granted it. Turning this on is a deliberate follow-up, not a side effect of this release.

  • employees:write can touch name, email, office, job title, phone, and lock-out only — never a badge ID, password, PIN, or 2FA setting.
  • Every write is idempotent via an optional Idempotency-Key header.
  • Punch and time-off writes are protected against concurrent-request races, proven with genuinely parallel requests, not just reasoned about.

Security & correctness fixes

  • Fixed an overnight-shift punch overlap bug that could double-count paid hours.
  • users.Email now has a real database-level uniqueness constraint.
  • Fixed a data bug where a blank Tag ID was stored as '' instead of NULL, which could crash the next save of any badge-less employee profile (admin console and employee self-service). One affected production record was corrected.
  • Fixed a bug where approving a time-off request spanning a year boundary deducted the leave balance against the wrong year — present in both the admin console and the new write API.

See CHANGELOG.md for details.

v1.3.0

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 25 Aug 15:59

External Reporting API

New read-only API surface (api/external/v1/, API-key authenticated): hours, summary, overtime, utilization, attendance, payroll, exceptions, trends, punctuality, and geofence reports; office/shift/schedule dimension endpoints; a live clock-in status feed; and an audit trail (punch changes, access log, auto-clockouts).

An OData v4 endpoint (api/external/odata/) with $filter/$select/$orderby/$top/$skip/$count support lets Power BI's native connector browse the API directly, alongside a generated OpenAPI 3.1 spec and a new in-app reference page (Admin → API Docs) with copy-paste-ready examples and a one-click demo key.

API Key Management

The create-key form now shows a permission checklist instead of a free-text scope field. Keys can be viewed again after creation (encrypted at rest, separate from the hash used for authentication; viewing requires re-entering the admin password) and deleted outright, in addition to the existing revoke action.

Fixes

  • Admin modals with content taller than the viewport are now scrollable instead of being silently clipped.
  • Admin CSS/JS assets are cache-busted on every edit.

See CHANGELOG.md for details.

v1.2.2 — Security Patch: CSRF Protection, Debug File Removal, Auth Fixes

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 16 May 00:30

FoleyTimePro v1.2.2 — Security Patch

🔴 Critical — Deleted publicly accessible debug files

Three test/debug files were reachable at public URLs with no authentication:

File Risk
test_db.php Hardcoded DB password in plaintext — anyone could visit the URL and see SecureNet25! and full connection output
api/test_api.php Exposed JWT key infrastructure and token generation without auth
api/test_notifications.php Exposed push notification service internals without auth

All three files have been deleted from both the server and the repository.


🔴 High — CSRF protection added to all 26 admin POST forms

All admin forms that mutate data (create/edit/delete users, admins, shifts, offices, settings, exports, time-off) previously had no cross-site request forgery protection.

Implementation:

  • admin/includes/csrf.php — new helper providing csrf_field() (outputs a hidden token input) and csrf_valid() (validates with constant-time hash_equals)
  • admin/includes/header.php — automatically loads the CSRF helper on every admin page render
  • Every <form method="POST"> now includes <?= csrf_field() ?>
  • Every POST handler now validates with csrf_valid() before processing — returns HTTP 403 on failure

Note: All session cookies are already set with SameSite=Strict, which independently mitigates CSRF for modern browsers. This adds defense-in-depth.


🟠 High — Two more admin pages were missing session auth

  • admin/export_summary_pdf.php — no $_SESSION['admin'] check; also had display_startup_errors = 1
  • admin/test_timeoff.php — no $_SESSION['admin'] check

Both now return HTTP 403 to unauthenticated requests.


🟡 Service Worker cache version bumped v1.0.2 → v1.1.0

Forces all browsers to discard stale cached assets and re-fetch, picking up the corrected FoleyTimePro-logo.png / FoleyTimePro-favicon.webp image paths fixed in v1.2.1.

v1.2.1 — Security Hardening, Broken Assets & Branding Cleanup

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 16 May 00:21

FoleyTimePro v1.2.1

Patch release focused on security hardening, broken asset references, and removing all remaining D-Best/TimeSmart branding.


Security

7 admin pages were publicly accessible without authentication. Any user who knew the URL could access timesheet data, trigger deletions, or download exports without logging in.

Files fixed:

  • admin/export_summary_excel.php — Excel export now returns HTTP 403 to unauthenticated requests
  • admin/export_summary_pdf.php — same
  • admin/process_timesheet_edits.php — JSON endpoint now returns {"success":false,"message":"Unauthorized"}
  • admin/process_specific_punch_deletion.php — same
  • admin/timesheet_view.php — redirects to login
  • admin/timesheet_edit.php — redirects to login
  • admin/timesheet_add.php — redirects to login
  • admin/update_admin_table.php — allows CLI, blocks unauthenticated HTTP with 403

Broken Image Paths

FoleyTimePro.png and FoleyTimePro-favicon.png were referenced across 11 files but neither file has ever existed, causing broken favicons and logos on multiple pages.

  • FoleyTimePro.png → FoleyTimePro-logo.png
  • FoleyTimePro-favicon.png → FoleyTimePro-favicon.webp
  • D-Best-favicon.webp (in offline.html) → FoleyTimePro-favicon.webp

Pages fixed: admin/verify_2fa.php, user/verify_2fa.php, docs/privacy.php, docs/terms.php, docs/report.php, error.php, offline.html, manifest.php, api/v1/branding.php, scripts/generate_icons.php

display_errors Disabled

5 files had ini_set('display_errors', 1) enabled, which leaks PHP stack traces and internal paths to end users in production.

Files fixed: admin/enable_2fa.php, admin/time_off_requests.php, admin/test_timeoff.php, admin/export_summary_pdf.php, user/enable_2fa.php

Branding Cleanup

All remaining D-Best/TimeSmart references removed:

  • sw.js — header comment updated to FoleyTimePro
  • css/components.css — header comment updated
  • Install/run_migration.php — output string updated
  • Install/nginx/conf.d/timesmart.conf — renamed to foleytimepro.conf, all internal upstream and log references updated

v1.2.0 — Full Repo Sync, Android App & Admin 2FA Fix

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 16 May 00:12

FoleyTimePro v1.2.0

Full synchronization of the production server to the repository. Every file now in the repo matches what is running live.

Bug Fix

  • Admin 2FA (admin/enable_2fa.php) — Same QR code crash as user 2FA: FoleyTimePro.png doesn't exist so realpath() returned false, passing null to a string-typed parameter. Fixed with conditional builder pattern using the correct FoleyTimePro-logo.png.

New Files Added to Repo

  • android-app/ — Native Android companion app (Kotlin/Gradle). Includes login, home/dashboard, setup screens, API client, and push notification support.
  • api/ — Full REST API v1: authentication (JWT), clock actions, user profile, shifts, time-off, branding, and push notifications.
  • admin/branding.php — Company branding management UI (colors, logo, favicon, background).
  • admin/manage_shifts.php / add_shift.php — Shift management pages.
  • admin/custom_reports.php — Custom report builder.
  • admin/geofences.php — Geofence location management.
  • admin/quickbooks.php — QuickBooks integration.
  • admin/includes/ — Shared admin header/footer/nav template files.
  • css/admin-layout.css — Master admin layout stylesheet (used by all admin pages).
  • css/home.css — Kiosk/home styles.
  • functions/get_branding.php — Branding DB helper used across the app.
  • functions/leave_balance.php — Leave balance calculation utilities.
  • functions/geofence.php — Geofence validation helper.
  • manifest.php — Dynamic PWA manifest generator.
  • offline.html — PWA offline fallback page.
  • user/time_off.php — Employee time-off request form.
  • Install/ — Full Docker deployment configs, nginx config, and DB migration scripts.
  • .gitignore — Now excludes .env, cache/, uploads/, logs/.

Updated Files

All previously tracked files updated to match production: admin pages, user portal, CSS, JS, auth, docs, kiosk.

v1.1.0 — UI Overhaul, Kiosk Redesign & Bug Fixes

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 16 May 00:09

FoleyTimePro v1.1.0

Major update covering UI redesigns, new features, and critical bug fixes across the entire application.


User Portal

  • Dashboard — New hero banner with status-colored gradient (green = clocked in, amber = lunch, navy = out). Two-column layout: clock actions on the left, this week's punches on the right. Live net-time timer now correctly starts after lunch end, not just after clock-in.
  • Settings — Avatar initials, sticky sidebar with active indicator, color-coded section icons, mobile tab bar.
  • Login — Fixed logo flash caused by broken image path; onerror loop prevention.
  • Modal (punch confirmation) — Fixed missing CSS that caused the confirm popup to be invisible. Fixed duplicate id="note" conflict that silently discarded the employee's note on every punch.

Admin Portal

  • Login page — Fully redesigned: white card on navy gradient, FoleyTimePro logo, Admin badge, employee portal back-link.
  • Edit User — Two-column card layout. Password field is now visible (type=text) with a Generate button and a copy-to-clipboard confirmation banner showing the new password. Shift assignment dropdown added.
  • Edit Shift — Complete redesign with day-of-week pill toggles, merged controls card. Bulk user assignment panel on the right: scrollable list grouped by office, live search, All/None toggles, status dot per user, saves independently.
  • Attendance table — Fixed sticky header bleeding into employee rows (z-index and top:0 fix for overflow-auto container).
  • Time-Off Requests — Wrapped in card, badge-styled status, type pill, combined date cell, review notes inline.

Auto Clock-Out

  • Added AutoClockOut toggle and GracePeriodMinutes field to shift edit page.
  • AutoClockOut column added to shifts table (default off).
  • Cron job (auto_clockout_cron.php) now: only runs for shifts with AutoClockOut enabled, records clock-out at the shift end time (not trigger time), sends push notification to the employee in addition to the admin email.
  • Fixed column name TimeOut → TimeOUT in the cron UPDATE query.

Kiosk

  • Full redesign: dark navy radial-gradient, glassmorphism panels, giant gradient-text clock, live date in header, pulsing badge scan icon.
  • Color-coded punch buttons: Clock In = green, Lunch Start = amber, Lunch End = blue, Clock Out = red, Cancel = gray full-width.
  • Fixed wrong status display: kiosk_status was missing bind_result() so variables were always undefined — every employee showed as "Clocked In" regardless of actual state.
  • Fixed wrong action executed: Kiosk mode was ignoring $_POST['action'] entirely and determining action from punch state sequentially. Clicking "Clock Out" when not clocked in would run Clock In. Now routes on the actual button pressed with guard clauses for invalid states.
  • Now PHP — reads company name, logo, favicon from branding DB.

Branding Uploads

  • Fixed 403: upload_branding.php was chmod 600 root:root, unreadable by PHP-FPM.
  • Raised nginx client_max_body_size to 25M and PHP upload_max_filesize to 20M.
  • Auto-resize: all uploads are now automatically resized and re-encoded (logos/favicons → WebP at target dimensions; backgrounds → original format at 1920×1080 max).

SSL Certificate

  • Regenerated self-signed cert with SAN covering DNS:time.foleyit.com, DNS:localhost, IP:10.1.0.36, IP:127.0.0.1 — eliminates Chrome's "Unsafe attempt to load URL from chrome-error://" error when accessing via internal IP.

Service Worker

  • Added cross-origin skip — SW no longer intercepts Cloudflare beacon or other third-party scripts, eliminating integrity hash failures in the console.
  • Updated STATIC_ASSETS to current file names; bumped CACHE_VERSION to clear stale caches.

Permissions & Infrastructure

  • Fixed cache/ ownership so branding JSON can be written by PHP-FPM.
  • Applied chmod a+rX + chown www-data across admin/, api/, functions/, user/ to fix blanket Permission Denied errors.
  • Fixed FK crash in shift user assignment (AssignedBy column) — now looks up admin numeric ID from session username instead of casting string to 0.

v1.0.0 — FoleyTimePro Initial Release

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 16 May 00:08
7bff242

FoleyTimePro v1.0.0

Initial public release of FoleyTimePro — rebranded from D-BEST TimeSmart.

What's included

  • Employee time clock portal (clock in, lunch, clock out)
  • Admin dashboard with timesheet management
  • Kiosk mode for badge/tag scanning
  • Two-factor authentication (TOTP)
  • PDF/Excel export for reports
  • Shift management
  • Time-off request system
  • Push notification support
  • PWA / installable app manifest