Files
opensourcepos/app/Language/lo/Config.php
Ollama 8da4aff262 fix(security): prevent command injection in sendmail path configuration
Add validation for the mailpath POST parameter to prevent command injection
attacks. The path is validated to only allow alphanumeric characters,
underscores, dashes, forward slashes, and dots.

- Required mailpath when protocol is "sendmail"
- Validates format for all non-empty mailpath values
- Blocks common injection vectors: ; | & ` $() spaces newlines
- Added mailpath_invalid translation to all 43 language files
- Simplified validation logic to avoid redundant conditions

Files changed:
- app/Controllers/Config.php: Add regex validation with protocol check
- app/Language/*/Config.php: Add mailpath_invalid error message (43 languages)
- tests/Controllers/ConfigTest.php: Unit tests for validation
2026-04-06 18:37:07 +00:00

333 lines
26 KiB
PHP

<?php
return [
"address" => "ທີ່ຢູ່ບໍລິສັດ",
"address_required" => "ກະລຸນາໃສ່ທີ່ຢູ່ບໍລິສັດ.",
"all_set" => "All file permissions are set correctly!",
"allow_duplicate_barcodes" => "ອະນຸຍາດໃຫ້ມີບາໂຄດຊໍ້າກັນ",
"apostrophe" => "ຈຸດລາຍນໍ້າ",
"backup_button" => "ການສຳຮອງ",
"backup_database" => "ການສຳຮອງຖານຂໍ້ມູນ",
"barcode" => "ບາໂຄດ",
"barcode_company" => "ຊື່ບໍລິສັດ",
"barcode_configuration" => "ການຕັ້ງຄ່າກ່ຽວກັບ Barcode",
"barcode_content" => "ເນື່ອຫາຂອງ Barcode",
"barcode_first_row" => "ແຖວທີ 1",
"barcode_font" => "ຟອນທ໌",
"barcode_formats" => "ຮູບແບບການໃສ່ຂໍ້ມູນ",
"barcode_generate_if_empty" => "ສ້າງຖ້າວ່າງເປົ່າ.",
"barcode_height" => "ສູງ (px)",
"barcode_id" => "ລະຫັດສິນຄ້າ/ຊື່ສິນຄ້າ",
"barcode_info" => "ຂໍ້ມູນການຕັ້ງຄ່າກ່ຽວກັບ Barcode",
"barcode_layout" => "ການຈັດລຽງຮູບແບບ Barcode",
"barcode_name" => "ຊື່ສິນຄ້າ",
"barcode_number" => "ລະຫັດ Barcode",
"barcode_number_in_row" => "ຈຳນວນແຖວທີ່ໃຊ້",
"barcode_page_cellspacing" => "Display page cellspacing.",
"barcode_page_width" => "Display page width",
"barcode_price" => "ລາຄາ",
"barcode_second_row" => "ແຖວທີ 2",
"barcode_third_row" => "ແຖວທີ 3",
"barcode_tooltip" => "ຄຳເຕືອນ: This feature can cause duplicate items to be imported or created. Do not use if you do not want duplicate barcodes.",
"barcode_type" => "ປະເພດ Barcode",
"barcode_width" => "ຄວາມກວ້າງ (px)",
"bottom" => "ດ້ານລຸ່ມຂອງເຈ້ຍ",
"cash_button" => "",
"cash_button_1" => "",
"cash_button_2" => "",
"cash_button_3" => "",
"cash_button_4" => "",
"cash_button_5" => "",
"cash_button_6" => "",
"cash_decimals" => "ຈຳນວນຕົວເລກເສດເງິນ",
"cash_decimals_tooltip" => "ກະລຸນາປັບຈຳນວນຕົວເລກເສດໃຫ້ເທົ່າກັນເພື່ອຈະໄດ້ບໍ່ມີການປັດມູນຄ່າເງິນ.",
"cash_rounding" => "ການປັດມູນຄ່າເງິນ",
"category_dropdown" => "",
"center" => "ທາງກາງຂອງເຈ້ຍ",
"change_apperance_tooltip" => "",
"comma" => "ເຄື່ອງຫມາຍຈຸດ",
"company" => "ຊື່ບໍລິສັດ",
"company_avatar" => "",
"company_change_image" => "ປ່ຽນຮູບ",
"company_logo" => "Logo ບໍລິສັດ",
"company_remove_image" => "ລຶບຮູບ",
"company_required" => "ກະລຸນາໃສ່ຊື່ບໍລິສັດ",
"company_select_image" => "ກະລຸນາເລືອກຮູບ",
"company_website_url" => "ທີ່ຢູ່ website ຂອງບໍລິສັດບໍ່ຖືກຕ້ອງ URL (http://...).",
"country_codes" => "ລະຫັດປະເທດ",
"country_codes_tooltip" => "ໃຊ້ເຄື່ອງຫມາຍຈຸດເພື່ອແຍກຫົວຫນ່ວຍເງິນຕາ",
"currency_code" => "",
"currency_decimals" => "ຈຳນວນຕົວເລກເສດເງິນ",
"currency_symbol" => "ສັນຍະລັກຂອງເງິນ",
"current_employee_only" => "",
"customer_reward" => "ລາງວັນ",
"customer_reward_duplicate" => "ລາງວັນສຳຫລັບລູກຄ້າຕ້ອງມີຄວາມແຕກຕ່າງ",
"customer_reward_enable" => "ໃຊ້ງານລະບົບລາງວັນສຳຫລັບລູກຄ້າ",
"customer_reward_invalid_chars" => "ລາງວັນບໍ່ສາມາດບັນຈຸໄດ້ '_'",
"customer_reward_required" => "ກະລຸນາກຳນົດລາງວັນ",
"customer_sales_tax_support" => "ເປີດໃຊ້ອາກອນຊົມໃຊ້",
"date_or_time_format" => "Date and Time Filter",
"datetimeformat" => "ຮູບແບບວັນທີ່ ແລະ ເວລາ",
"decimal_point" => "ເຄື່ອງຫມາຍເລກເສດເງິນ",
"default_barcode_font_size_number" => "ຂະຫນາດຂອງຕົວອັກສອນຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_font_size_required" => "ກະລຸນາໃສ່ຂະຫນາດຂອງຕົວອັກສອນ.",
"default_barcode_height_number" => "ຂະຫນາດຄວາມສູງຂອງ Barcode ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_height_required" => "ກະລຸນາໃສ່ຂະຫນາດຄວາມສູງຂອງ Barcode.",
"default_barcode_num_in_row_number" => "ຈຳນວນແຖວຂອງ Barcode ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_num_in_row_required" => "ກະລຸນາໃສ່ຈຳນວນແຖວຂອງ Barcode.",
"default_barcode_page_cellspacing_number" => "ຄວາມຫ່າງລະຫວ່າງຫ້ອງຂໍ້ມູນຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_page_cellspacing_required" => "ກະລຸນາໃສ່ຄວາມຫ່າງລະຫວ່າງຫ້ອງຂໍ້ມູນ.",
"default_barcode_page_width_number" => "ຄວາມກວ້າງຂອງຫນ້າ Barcode ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_page_width_required" => "ກະລຸນາໃສ່ຄວາມກວ້າງຂອງຫນ້າ Barcode.",
"default_barcode_width_number" => "ຄວາມກວ້າງຂອງ Barcode ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_barcode_width_required" => "ກະລຸນາກຳນົດຄວາມກວ້າງຂອງ Barcode.",
"default_item_columns" => "",
"default_origin_tax_code" => "ທີ່ມາຂອງອາກອນ",
"default_receivings_discount" => "",
"default_receivings_discount_number" => "",
"default_receivings_discount_required" => "",
"default_sales_discount" => "ເປີເຊັນສ່ວນຫລຸດ %",
"default_sales_discount_number" => "ເປເຊັນສ່ວນຫລຸດ ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_sales_discount_required" => "ກະລຸນາກຳນົດເປີເຊັນສ່ວນຫລຸດ.",
"default_tax_category" => "",
"default_tax_code" => "",
"default_tax_jurisdiction" => "",
"default_tax_name_number" => "ຊື່ຂອງອາກອນຕ້ອງເປັນຕົວອັກສອນ.",
"default_tax_name_required" => "ກະລຸນາໃສ່ຊື່ອາກອນ.",
"default_tax_rate" => "ອັດຕາອາກອນ %",
"default_tax_rate_1" => "ອັດຕາອາກອນທີ 1",
"default_tax_rate_2" => "ອັດຕາອາກອນທີ 2",
"default_tax_rate_3" => "",
"default_tax_rate_number" => "ອັດຕາອາກອນ ຕ້ອງເປັນຕົວເລກເທົ່ານັ້ນ.",
"default_tax_rate_required" => "ກະລຸນາກຳນົດອັດຕາອາກອນ.",
"derive_sale_quantity" => "",
"derive_sale_quantity_tooltip" => "",
"dinner_table" => "ໂຕະສຳຫລັບຮ້ານອາຫານ",
"dinner_table_duplicate" => "ເລກໂຕະຕ້ອງບໍ່ຊໍ້າກັນ.",
"dinner_table_enable" => "ເປີດໃຊ້ງານລະບົບໂຕະສຳລັບຮ້ານອາຫານ",
"dinner_table_invalid_chars" => "ບໍ່ສາມາດໃສ່ຊື່ໂຕະທີ່ມີ '_' ນີ້ໄດ້.",
"dinner_table_required" => "ກະລຸນາກຳນົດຊື່ໂຕະ.",
"dot" => "ຈໍ້າເມັດ",
"email" => "Email",
"email_configuration" => "Email Configuration",
"email_mailpath" => "Path to Sendmail",
"email_protocol" => "Protocol",
"email_receipt_check_behaviour" => "",
"email_receipt_check_behaviour_always" => "",
"email_receipt_check_behaviour_last" => "",
"email_receipt_check_behaviour_never" => "",
"email_smtp_crypto" => "SMTP Encryption",
"email_smtp_host" => "SMTP Server",
"email_smtp_pass" => "SMTP Password",
"email_smtp_port" => "SMTP Port",
"email_smtp_timeout" => "SMTP Timeout (s)",
"email_smtp_user" => "SMTP Username",
"enable_avatar" => "",
"enable_avatar_tooltip" => "",
"enable_dropdown_tooltip" => "",
"enable_new_look" => "",
"enable_right_bar" => "",
"enable_right_bar_tooltip" => "",
"enforce_privacy" => "",
"enforce_privacy_tooltip" => "",
"fax" => "Fax",
"file_perm" => "There are problems with file permissions please fix and reload this page.",
"financial_year" => "Fiscal Year Start",
"financial_year_apr" => "1st of April",
"financial_year_aug" => "1st of August",
"financial_year_dec" => "1st of December",
"financial_year_feb" => "1st of February",
"financial_year_jan" => "1st of January",
"financial_year_jul" => "1st of July",
"financial_year_jun" => "1st of June",
"financial_year_mar" => "1st of March",
"financial_year_may" => "1st of May",
"financial_year_nov" => "1st of November",
"financial_year_oct" => "1st of October",
"financial_year_sep" => "1st of September",
"floating_labels" => "",
"gcaptcha_enable" => "Login Page reCAPTCHA",
"gcaptcha_secret_key" => "reCAPTCHA Secret Key",
"gcaptcha_secret_key_required" => "reCAPTCHA Secret Key is a required field",
"gcaptcha_site_key" => "reCAPTCHA Site Key",
"gcaptcha_site_key_required" => "reCAPTCHA Site Key is a required field",
"gcaptcha_tooltip" => "Protect the Login page with Google reCAPTCHA, click the icon for an API key pair.",
"general" => "General",
"general_configuration" => "General Configuration",
"giftcard_number" => "Gift Card Number",
"giftcard_random" => "Generate Random",
"giftcard_series" => "Generate in Series",
"image_allowed_file_types" => "",
"image_max_height_tooltip" => "",
"image_max_size_tooltip" => "",
"image_max_width_tooltip" => "",
"image_restrictions" => "",
"include_hsn" => "",
"info" => "Information",
"info_configuration" => "Store Information",
"input_groups" => "",
"integrations" => "",
"integrations_configuration" => "",
"invoice" => "Invoice",
"invoice_configuration" => "Invoice Print Settings",
"invoice_default_comments" => "Default Invoice Comments",
"invoice_email_message" => "Invoice Email Template",
"invoice_enable" => "Enable Invoicing",
"invoice_printer" => "Invoice Printer",
"invoice_type" => "",
"is_readable" => "",
"is_writable" => "is writable, but the permissions are higher than 750.",
"item_markup" => "",
"jsprintsetup_required" => "Warning: This functionality will only work if you have the FireFox jsPrintSetup addon installed. Save anyway?",
"language" => "Language",
"last_used_invoice_number" => "Last used Invoice Number",
"last_used_quote_number" => "Last used Quote Number",
"last_used_work_order_number" => "Last used W/O Number",
"left" => "Left",
"license" => "License",
"license_configuration" => "License Statement",
"line_sequence" => "Line Sequence",
"lines_per_page" => "Lines per Page",
"lines_per_page_number" => "",
"lines_per_page_required" => "Lines per Page is a required field.",
"locale" => "Localization",
"locale_configuration" => "Localization Configuration",
"locale_info" => "Localization Configuration Information",
"location" => "Stock",
"location_configuration" => "Stock Locations",
"location_info" => "Location Configuration Information",
"login_form" => "",
"logout" => "Do you want to make a backup before logging out? Click [OK] to backup or [Cancel] to logout.",
"mailchimp" => "Mailchimp",
"mailchimp_api_key" => "Mailchimp API Key",
"mailchimp_configuration" => "Mailchimp Configuration",
"mailchimp_key_successfully" => "API Key is valid.",
"mailchimp_key_unsuccessfully" => "API Key is invalid.",
"mailchimp_lists" => "Mailchimp List(s)",
"mailchimp_tooltip" => "Click the icon for an API Key.",
"message" => "Message",
"message_configuration" => "Message Configuration",
"msg_msg" => "Saved Text Message",
"msg_msg_placeholder" => "If you wish to use a SMS template save your message here, otherwise leave the box blank.",
"msg_pwd" => "SMS-API Password",
"msg_pwd_required" => "SMS-API Password is a required field",
"msg_src" => "SMS-API Sender ID",
"msg_src_required" => "SMS-API Sender ID is a required field",
"msg_uid" => "SMS-API Username",
"msg_uid_required" => "SMS-API Username is a required field",
"multi_pack_enabled" => "",
"no_risk" => "No security/vulnerability risks.",
"none" => "none",
"notify_alignment" => "Notification Popup Position",
"number_format" => "Number Format",
"number_locale" => "Localization",
"number_locale_invalid" => "The entered locale is invalid. Check the link in the tooltip to find a valid locale.",
"number_locale_required" => "Number Locale is a required field.",
"number_locale_tooltip" => "Find a suitable locale through this link.",
"os_timezone" => "",
"ospos_info" => "",
"payment_options_order" => "Payment Options Order",
"perm_risk" => "Permissions higher than 750 leaves this software at risk.",
"phone" => "Company Phone",
"phone_required" => "Company Phone is a required field.",
"print_bottom_margin" => "Margin Bottom",
"print_bottom_margin_number" => "Margin Bottom must be a number.",
"print_bottom_margin_required" => "Margin Bottom is a required field.",
"print_delay_autoreturn" => "",
"print_delay_autoreturn_number" => "",
"print_delay_autoreturn_required" => "",
"print_footer" => "Print Browser Footer",
"print_header" => "Print Browser Header",
"print_left_margin" => "Margin Left",
"print_left_margin_number" => "Margin Left must be a number.",
"print_left_margin_required" => "Margin Left is a required field.",
"print_receipt_check_behaviour" => "",
"print_receipt_check_behaviour_always" => "",
"print_receipt_check_behaviour_last" => "",
"print_receipt_check_behaviour_never" => "",
"print_right_margin" => "Margin Right",
"print_right_margin_number" => "Margin Right must be a number.",
"print_right_margin_required" => "Margin Right is a required field.",
"print_silently" => "Show Print Dialog",
"print_top_margin" => "Margin Top",
"print_top_margin_number" => "Margin Top must be a number.",
"print_top_margin_required" => "Margin Top is a required field.",
"quantity_decimals" => "Quantity Decimals",
"quick_cash_enable" => "",
"quote_default_comments" => "",
"receipt" => "Receipt",
"receipt_category" => "",
"receipt_configuration" => "Receipt Print Settings",
"receipt_default" => "Default",
"receipt_font_size" => "Font Size",
"receipt_font_size_number" => "Font Size must be a number.",
"receipt_font_size_required" => "Font Size is a required field.",
"receipt_info" => "Receipt Configuration Information",
"receipt_printer" => "Ticket Printer",
"receipt_short" => "Short",
"receipt_show_company_name" => "Show Company Name",
"receipt_show_description" => "Show Description",
"receipt_show_serialnumber" => "Show Serial Number",
"receipt_show_tax_ind" => "",
"receipt_show_taxes" => "Show Taxes",
"receipt_show_total_discount" => "Show Total Discount",
"receipt_template" => "Receipt Template",
"receiving_calculate_average_price" => "Calc avg. Price (Receiving)",
"recv_invoice_format" => "Receivings Invoice Format",
"register_mode_default" => "Default Register Mode",
"report_an_issue" => "",
"return_policy_required" => "Return policy is a required field.",
"reward" => "Reward",
"reward_configuration" => "Reward Configuration",
"right" => "Right",
"sales_invoice_format" => "Sales Invoice Format",
"sales_quote_format" => "Sales Quote Format",
"mailpath_invalid" => "",
"saved_successfully" => "Configuration save successful.",
"saved_unsuccessfully" => "Configuration save failed.",
"security_issue" => "Security Vulnerability Warning",
"server_notice" => "Please use the below info for issue reporting.",
"service_charge" => "",
"show_due_enable" => "",
"show_office_group" => "Show office icon",
"statistics" => "Send Statistics",
"statistics_tooltip" => "Send statistics for development and feature improvement purposes.",
"stock_location" => "Stock location",
"stock_location_duplicate" => "Stock Location must be unique.",
"stock_location_invalid_chars" => "Stock Location can not contain '_'.",
"stock_location_required" => "Stock location is a required field.",
"suggestions_fifth_column" => "",
"suggestions_first_column" => "Column 1",
"suggestions_fourth_column" => "",
"suggestions_layout" => "Search Suggestions Layout",
"suggestions_second_column" => "Column 2",
"suggestions_third_column" => "Column 3",
"system_conf" => "Setup & Conf",
"system_info" => "System Info",
"table" => "Table",
"table_configuration" => "Table Configuration",
"takings_printer" => "Receipt Printer",
"tax" => "Tax",
"tax_category" => "Tax Category",
"tax_category_duplicate" => "",
"tax_category_invalid_chars" => "",
"tax_category_required" => "",
"tax_category_used" => "Tax category cannot be deleted because it is being used.",
"tax_configuration" => "Tax Configuration",
"tax_decimals" => "Tax Decimals",
"tax_id" => "",
"tax_included" => "Tax Included",
"theme" => "Theme",
"theme_preview" => "",
"thousands_separator" => "Thousands Separator",
"timezone" => "Timezone",
"timezone_error" => "",
"top" => "Top",
"use_destination_based_tax" => "",
"user_timezone" => "",
"website" => "Website",
"wholesale_markup" => "",
"work_order_enable" => "Work Order Support",
"work_order_format" => "Work Order Format",
];