Repository navigation
Releases
DRXStore v3.2.0
A security-focused patch release. One vulnerability was identified, responsibly disclosed, and resolved in full.
Security Fixes
Broken access control: supplier could tamper with another supplier's purchase order
Medium — CVSS 6.5 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N) — CWE-639 (Authorization Bypass Through User-Controlled Key / IDOR)
public/supplier/orders.php looked up the submitted po_id with an ownership filter, but the save_prices POST branch was gated only on the resulting status string, which silently defaulted to 'pending' when no matching (not-owned) purchase order was found. The branch never checked that the lookup actually succeeded, and the writes were keyed only on the raw po_id from the request — so an authenticated supplier could tamper with prices/status on any purchase order, including other suppliers'.
Fix: the save_prices branch now requires the ownership-checked $po object to be non-null before it can execute.
Acknowledgements
Reported by Peter Wilfahrt (GitHub | Web) via GitHub Private Vulnerability Reporting.
Verification
This release does not ship a custom zip asset — the in-app Software Updater always downloads GitHub's own auto-generated source archive for this tag:
https://github.com/psvim/drxstore/archive/refs/tags/v3.2.0.zip
The attached drxstore-3.2.0.zip.sha256 is the SHA256 of that exact archive. Verify manually with:
curl -L -o drxstore-3.2.0.zip https://github.com/psvim/drxstore/archive/refs/tags/v3.2.0.zip
sha256sum -c drxstore-3.2.0.zip.sha256| File | SHA256 |
|---|---|
drxstore-3.2.0.zip (GitHub source archive) |
0203def285a2186c8acdabfb40d9d2d897d7cb9985044a97dc300943f33da8b4 |
DRXStore v3.1.0
Security Fixes
- Missing authentication on
get_batches.php(Medium):public/admin/get_batches.phpcalledstartSession()without verifying staff/admin authentication (requireStaff()), allowing unauthenticated requests via?p=get_batches&mid=<id>to enumerate active batch numbers, stock counts, MRPs, packing types, and expiry dates (CWE-306/CWE-200, CVSS 5.3). ReplacedstartSession()withrequireStaff().
Acknowledgements
Security issue in 3.1.0 was reported by Peter Wilfahrt (GitHub | Web) through GitHub Private Vulnerability Reporting. Thank you.
UI Changes
- Favicon changed from
RxtoDxacross the admin portal. - Cart row now shows strip breakdown: when an item is added in strip mode, the cart sub-line reads e.g. "2 strips × 10 = 20 units @ ₹8.50/unit" instead of the flat unit count.
- Stock display shows strip availability: the batch info bar now reads e.g. "80 units (8 strips)" when the selected batch has a strip packing, so staff can see both counts at a glance.
Bug Fixes
- POS strip mode —
qty_modenot posted to server: the strip/unit mode selection was converted client-side butcart_add.phpnever received it, so strip-sourced cart items had nostripsorstrip_qtymetadata. Fixed: a hiddenqty_modefield is now posted;cart_add.phpreads it and storesstripsandstrip_qtyin the cart item for display. - Dead
actual_qtyhidden field removed:posUpdateQtyCalc()created a redundantactual_qtyhidden input that was never read by the server. The form-submit interceptor already rewritesqtydirectly; the dead field is gone. - Strip mode min-qty guard: submitting 0 strips now blocks submission and shows an inline alert instead of silently adding 0 units to the cart.
Breaking Changes
- Medicines import/export: CSV only. XLSX import and XLSX export have been removed from the Medicines module. Import now accepts
.csvand.txtonly; the export dropdown has been replaced with a single "Export CSV" button. The exported CSV includes a UTF-8 BOM so it opens correctly in Excel without any configuration. The sample download also gains the BOM. This simplifies the codebase, removes the ZipArchive dependency from the medicines page, and eliminates a class of formatting bugs that affected the hand-rolled XLSX writer.
New Features
- Strip/Packing-based stock entry: Batches can now be entered and sold by strip or pack, not just by unit. When adding or receiving a batch, select a packing type (Blister, Alu-Alu, Strip, Bottle, Vial, Ampoule, Tube, Sachet, Jar, Box, Other) and set units-per-strip. Switching to "Strips" mode auto-calculates total unit quantity (
strips × units/strip) and converts strip-price to per-unit MRP automatically — stored internally as per-unit. - Purchase Price now strip-aware in Batch add/edit: When entering a batch in Strips mode, the Purchase Price label changes to "Purchase Price/Strip" and the hint shows the computed per-unit cost and GST breakdown live. On save, the per-strip value is automatically divided by units-per-strip and stored as per-unit (matching the behaviour already in place for MRP). The
purchase_pricecolumn is upgraded fromDECIMAL(10,2)toDECIMAL(10,4)(auto-migrated on boot) for accurate sub-unit storage. - Packing type column in Batch List: Batch table now shows packing type and units-per-strip.
Bug Fixes
- Version display double-v: Software update page showed
vv3.0.1when a new release was available. Version tag is now stripped of its leadingvbefore display. - Version card double name: Installed version card showed
DRXStore · DRXStore(APP_NAME repeated). Fixed to show justDRXStore. - Software Updater icon missing: Nav menu item had no icon (
updatekey was absent from icon map). Added correct refresh SVG icon. - Settings card stale text: Software Update card on settings page still referenced the old "Upload a ZIP" method. Updated to reflect the GitHub-based updater with SHA256 verification.
- attribution.php hardcoded version:
_BUILD_SIGand canonical version were hardcoded asv2.0.0/1.0. Now derived fromAPP_VERSIONconstant so they auto-reflect the installed version after every upgrade. - Emojis replaced with SVGs: All emoji characters (🔄 📦 🔒 🚀 ✓) in the Software Update page replaced with inline SVG icons for consistent rendering across all platforms.
- purchase.php existing-batch missing strip fields: When receiving a PO where the batch already existed,
strip_qtyandpacking_typewere not updated on merge. Fixed. - purchase.php JS receive modal strip fields missing: Dynamically-built receive modal rows lacked packing type, units-per-strip, and qty-mode selects. Fixed to match the server-rendered version.
- get_batches.php unescaped output:
packing_typevalue was not HTML-escaped in option label text. Fixed withhtmlspecialchars(). - backup_mysql CSRF missing: Settings MySQL backup link had no CSRF token; handler had no
verifyCsrfGet()call. Both fixed.
Database / Schema
- MRP precision:
batches.mrp,sales_items.mrp, andpo_items.mrpupgraded fromDECIMAL(10,2)toDECIMAL(10,4)— prevents rounding loss on per-unit prices computed from strip prices (e.g. ₹60 ÷ 7 units = ₹8.5714). - Auto-migration on boot:
MySQLDB::migrate()automatically upgrades column types and adds missing columns on first boot after upgrade — zero manual SQL required. - schema.sql updated to v3.1.0: Reflects all column changes above with inline migration
ALTER TABLEstatements for manual runs.
Upgrade & Backup
- Mandatory pre-upgrade backup: Applying any update now automatically creates a full data backup before touching any files — ZIP for JSON storage, SQL dump for MySQL. The backup downloads to the browser immediately after the update applies.
- Re-download backup button: Software Update page shows a persistent "Download Backup" button after every successful update so the backup can be retrieved again if the initial download was missed.
- JSON backup in Settings: JSON storage users now have a "Download JSON Backup (.zip)" button in Settings → Database Backup & Restore, matching the existing MySQL backup option.
and many more.....
DRXStore v3.0.1
What's Changed & Bug Fixes
- Open Source Licensing: Added GNU General Public License v3.0 (GPLv3) to the repository (
LICENSE). - Version Tracking: Fixed
APP_VERSIONconstant reporting 2.0.0; updater now automatically rewrites the version string inconfig/app.phppost-update. - Export Enhancements:
- Resolved UTF-8 BOM encoding issue causing mojibake in Excel CSV exports.
- Improved XLSX export formatting with bold header rows, frozen top rows, and auto-adjusted column widths.
DRXStore v3.0.0 — Security Hardening Release
DRXStore v3.0.0 — Security Hardening Release
This release resolves 19 security vulnerabilities and fixes the CSV medicine import bug.
Upgrading from v2.0.0 is strongly recommended. v2.0.0 is no longer supported.
Security fixes
- [Critical]
requireAdmin()now verifies role — staff users can no longer access admin pages - [Critical] Software updater replaced with GitHub-only fetch — no user-uploaded ZIP accepted
- [High] CSRF protection on all forms and sensitive GET actions
- [High] Parameterised database queries throughout; XSS escaping on all output
- [High] File upload extension whitelist + MIME check
- [Medium] SMTP password encrypted with AES-256-GCM at rest
- [Medium] Database restore requires admin password confirmation
- [Medium] Setup wizard locked after first run (one-time token)
- [Medium] Rate limiting and lockout on all login forms
- [Medium] Session regenerated on login; idle timeout after 2 hours
- [Low] Security headers (CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy)
- [Low] Minimum password length and complexity enforced on all forms
- [Low] Stack traces suppressed; errors logged only
- [Low] nginx.conf.example + PHP-level guards for data/, config/, helpers/, views/
- [Low] Session cookie set with SameSite=Lax
Bug fixes
- CSV import fixed — missing route, BOM stripping, CRLF normalisation, flexible column mapping, active column removed from insert
Security advisory
Two critical security vulnerabilities involving privilege escalation and remote code execution (RCE) in the software updater were responsibly disclosed by Anil Kumar Voleti (Linkedin).
We sincerely thank him for his responsible disclosure and valuable contribution to improving DRXStore security.
See SECURITY.md and CHANGELOG.md for full details.
Standard Version 2.0.0 Github Release
v2.0.0-production Update README.md