36 Commits

Author SHA1 Message Date
jekkos
bafe3ddf1b Fix stored XSS vulnerability in Attribute Definitions (GHSA-rvfg-ww4r-rwqf) (#4429)
* Fix stored XSS vulnerability in Attribute Definitions

GHSA-rvfg-ww4r-rwqf: Stored XSS via Attribute Definition Name

Security Impact:
- Authenticated users with attribute management permission can inject XSS payloads
- Payloads execute when viewing/editing attributes in admin panel
- Can steal session cookies, perform CSRF attacks, or compromise admin operations

Root Cause:
1. Input: Attributes.php postSaveDefinition() accepts definition_name without sanitization
2. Output: Views echo definition_name without proper escaping

Fix Applied:
- Input sanitization: Added FILTER_SANITIZE_FULL_SPECIAL_CHARS to definition_name and definition_unit
- Output escaping: Added esc() wrapper when displaying definition_name in views
- Defense-in-depth: htmlspecialchars on attribute values saved to database

Files Changed:
- app/Controllers/Attributes.php - Sanitize inputs on save
- app/Views/attributes/form.php - Escape output on display
- app/Views/attributes/item.php - Escape output on display

* Remove input sanitization, keep output escaping only

Use escaping on output (esc() in views) as the sole XSS prevention
measure instead of sanitizing on input. This preserves the original
data in the database while still protecting against XSS attacks.

* Add validation for definition_fk foreign key in attribute definitions

Validate definition_group input before saving:
- Must be a positive integer (> 0)
- Must exist in attribute_definitions table
- Must be of type GROUP to ensure data integrity

Also add translation for definition_invalid_group error message
in all 45 language files (English placeholder for translations).

* Refactor definition_fk validation into single conditional statement

* Add esc() to attribute value outputs for XSS protection

- Add esc() to TEXT input value in item.php
- Add esc() to definition_unit in form.php

These fields display user-provided content and need output escaping
to prevent stored XSS attacks.

* Refactor definition_group validation into separate method

Extract validation logic for definition_fk into validateDefinitionGroup()
private method to improve code readability and reduce method complexity.

Returns:
- null if input is empty (no group selected)
- false if validation fails (invalid group)
- integer ID if valid

* Add translations for definition_invalid_group in all languages

- Added proper translations for 28 languages (de, es, fr, it, nl, pl, pt-BR, ru, tr, uk, th, zh-Hans, zh-Hant, ro, sv, vi, id, el, he, fa, hu, da, sw-KE, sw-TZ, ar-LB, ar-EG)
- Set empty string for 14 languages to fallback to English (cs, hr-HR, bg, bs, ckb, hy, km, lo, ml, nb, ta, tl, ur, az)

---------

Co-authored-by: Ollama <ollama@steganos.dev>
2026-03-14 15:33:58 +00:00
Ollama
9a2b308647 Sync language files (#3468)
- Add csv_import_invalid_location to Items.php for CSV import validation
- Add error_deleting_admin and error_updating_admin to Employees.php for admin protection messages

Strings added with empty values so they fallback to English and show as untranslated in Weblate.
2026-03-09 07:45:19 +01:00
Lucas Lyimo
5c8905aa1b Language Array Key Typo Fix (#4371)
* Fix typo in stock location translation

* Fix typo in stock location key

* Fix typo in Language Receivings files stock_location

* Add Swahili-TZ Language Files

* Add Swahili-KE Language Files
2026-03-04 22:06:17 +01:00
BudsieBuds
e83c23cf0c Improve code style and PSR-12 compliance (#4204)
* Improve code style and PSR-12 compliance
- refactored code formatting to adhere to PSR-12 guidelines
- standardized coding conventions across the codebase
- added missing framework files and reverted markup changes
- reformatted arrays for enhanced readability
- updated language files for consistent styling and clarity
- minor miscellaneous improvements
2025-05-02 19:37:06 +02:00
objecttothis
e90b5b87da Replace tabs with spaces (#4196)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-03-28 21:24:21 +04:00
Kristoffer Grundström
f66ffc81b7 Translated using Weblate (Swedish)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/sv/
2024-11-03 01:59:10 +01:00
Kristoffer Grundström
07a38f5a90 Translated using Weblate (Swedish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/sv/
2024-11-03 01:59:10 +01:00
Kristoffer Grundström
801639957e Translated using Weblate (Swedish)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/sv/
2024-11-03 01:59:09 +01:00
Kristoffer Grundström
e384378d27 Translated using Weblate (Swedish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/sv/
2024-11-03 01:59:09 +01:00
Kristoffer Grundström
289fd78113 Translated using Weblate (Swedish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/sv/
2024-10-31 05:54:42 +01:00
Kristoffer Grundström
fc8e7dc116 Translated using Weblate (Swedish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2024-10-31 05:54:42 +01:00
Kristoffer Grundström
ebb1546995 Translated using Weblate (Swedish)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
06edce9ee2 Translated using Weblate (Swedish)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
0164d451b1 Translated using Weblate (Swedish)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
50fe205026 Translated using Weblate (Swedish)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
07d97de067 Translated using Weblate (Swedish)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
fbb2a0d8ab Translated using Weblate (Swedish)
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
d4f0a1d509 Translated using Weblate (Swedish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
c20cf68e37 Translated using Weblate (Swedish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
e64f04dba6 Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
1d538ba60c Translated using Weblate (Swedish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
41bfeab725 Translated using Weblate (Swedish)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
3053e6a7c9 Translated using Weblate (Swedish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
bf1aa1f986 Translated using Weblate (Swedish)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
1d4f7eace1 Translated using Weblate (Swedish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
f6914701d2 Translated using Weblate (Swedish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2024-10-29 08:06:42 +01:00
jekkos
70ac367761 Reinstate required_username translation (#3468) 2024-06-27 19:38:37 +02:00
jekkos
fea38e1608 Sync language files (#3468) 2024-06-15 17:19:15 +02:00
BudsieBuds
9fe578504c Update login screen
- Updated deprecated BS5 classes
- Throw errors in separate alert boxes and not as an <ul>
- Make error translatable
- Small updates/fixes
2024-06-15 17:19:15 +02:00
jekkos
9f2474e156 Use loading animation only (#3891) 2024-06-15 17:19:15 +02:00
jekkos
1789311299 Strip prefix in calendar files (#3864) 2024-06-15 17:19:15 +02:00
jekkos
dedb6f9836 Add calendar language files (#3864) 2024-06-15 17:19:15 +02:00
objecttothis
7d791ba59f Corrected keys for Bootstrap_tables.php 2024-06-15 17:19:15 +02:00
jekkos
b4d117011a Add CI4 language migration scripts (#3468) 2024-06-15 17:19:15 +02:00
jekkos
828fd639b2 Porting over 4f3226b 2024-06-15 17:19:15 +02:00
jekkos
73b189b6d4 Prepare rebase: move files to new folder structure 2024-06-15 17:19:15 +02:00