Skip to content
Permalink
Browse files
Blind sql injection fixes (#3284)
  • Loading branch information
jekkos committed Aug 26, 2021
1 parent b925155 commit b4c48e5141fd04857def6cd141f96d27a5986a45
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 18 deletions.
@@ -0,0 +1,27 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Security Policy](#security-policy)
- [Supported Versions](#supported-versions)
- [Reporting a Vulnerability](#reporting-a-vulnerability)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# Security Policy

## Supported Versions

We release patches for security vulnerabilities. Which versions are eligible
receiving such patches depend on the CVSS v3.0 Rating:

| CVSS v3.0 | Supported Versions |
| --------- | -------------------------------------------------- |
| 7.3 | 3.5.5 |

## Reporting a Vulnerability

Please report (suspected) security vulnerabilities to
**[jekkos](mailto:jekkos@opensourcepos.org)**. You will receive a response from
us within 48 hours. If the issue is confirmed, we will release a patch as soon

This comment has been minimized.

Copy link
@jekkos

jekkos Aug 26, 2021

Author Member

I must admit this SLA to be quite ambitious, some backup would appreciated.

as possible depending on complexity but historically within a few days.
@@ -24,7 +24,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? definition.definition_name : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$attributes = $this->Attribute->search($search, $limit, $offset, $sort, $order);
@@ -189,4 +189,4 @@ public function delete()
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('attributes_definition_cannot_be_deleted')));
}
}
}
}
@@ -25,7 +25,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'cashup_id' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');
$filters = array(
'start_date' => $this->input->get('start_date'),
@@ -58,7 +58,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? LAST_NAME : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$customers = $this->Customer->search($search, $limit, $offset, $sort, $order);
@@ -17,7 +17,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? LAST_NAME : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$employees = $this->Employee->search($search, $limit, $offset, $sort, $order);
@@ -30,7 +30,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'expense_id' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');
$filters = array(
'start_date' => $this->input->get('start_date'),
@@ -24,7 +24,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'category_name' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$expense_categories = $this->Expense_category->search($search, $limit, $offset, $sort, $order);
@@ -24,7 +24,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'giftcard_number' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$giftcards = $this->Giftcard->search($search, $limit, $offset, $sort, $order);
@@ -59,7 +59,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? NAME : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$item_kits = $this->Item_kit->search($search, $limit, $offset, $sort, $order);
@@ -40,7 +40,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? NAME : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$this->item_lib->set_item_location($this->input->get('stock_location'));
@@ -54,10 +54,10 @@ public function get_row($row_id)
public function search()
{
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$order = $this->input->get('order');
$sort = $this->input->post('sort') === NULL ? 'sales.sale_time' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$filters = array('sale_type' => 'all',
'location_id' => 'all',
@@ -35,7 +35,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? LAST_NAME : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$suppliers = $this->Supplier->search($search, $limit, $offset, $sort, $order);
@@ -25,7 +25,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'tax_category' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$tax_categories = $this->Tax_category->search($search, $limit, $offset, $sort, $order);
@@ -29,7 +29,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'tax_code_name' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$tax_codes = $this->Tax_code->search($search, $limit, $offset, $sort, $order);
@@ -25,7 +25,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'jurisdiction_name' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$tax_jurisdictions = $this->Tax_jurisdiction->search($search, $limit, $offset, $sort, $order);
@@ -57,7 +57,7 @@ public function search()
$search = $this->input->get('search');
$limit = $this->input->get('limit');
$offset = $this->input->get('offset');
$sort = $this->input->get('sort');
$sort = $this->input->post('sort') === NULL ? 'tax_code_name' : $this->db->escape($this->input->get('sort'));
$order = $this->input->get('order');

$tax_rates = $this->Tax->search($search, $limit, $offset, $sort, $order);

0 comments on commit b4c48e5

Please sign in to comment.