From 375408a7a7ba661008f360526f06481db3403917 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sun, 28 Aug 2016 12:39:00 +0100 Subject: [PATCH 01/18] Amend COPYING license file --- COPYING | 6 ++++-- application/controllers/Login.php | 33 +++++++++++++++++++++++++++++-- license/COPYING | 6 ++++-- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/COPYING b/COPYING index 9d2643e6b..9eb29b09e 100644 --- a/COPYING +++ b/COPYING @@ -21,8 +21,10 @@ subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The footer signature "You are using Open Source Point Of Sale" with version, -hash and link to the original distribution of the code MUST BE RETAINED, +You cannot claim copyright or ownership of the Software. + +Footer signatures "You are using Open Source Point Of Sale" and/or "Open Source Point Of Sale" +with version, hash and URL link to the original distribution of the code MUST BE RETAINED, MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR diff --git a/application/controllers/Login.php b/application/controllers/Login.php index 606336a84..b8ff80589 100644 --- a/application/controllers/Login.php +++ b/application/controllers/Login.php @@ -31,8 +31,36 @@ class Login extends CI_Controller $login_info = $this->config->item('language') . ' | ' . $this->config->item('timezone') . ' | ' . $this->config->item('currency_symbol') . ' | ' . $this->config->item('theme') . ' | ' . $this->config->item('website') . ' | ' . $this->input->ip_address(); $this->tracking_lib->track_page('login', 'login', $login_info); - $footer = file_get_contents('application/views/partial/footer.php'); - $footer = strip_tags($footer); + $login_footer = ''; + $handle = @fopen('application/views/login.php', 'r'); + if($handle) + { + while(!feof($handle)) + { + $buffer = fgets($handle); + if(strpos($buffer, 'Open Source Point Of Sale') !== FALSE) + { + $login_footer = ''; + } + elseif(strpos($buffer, 'form_close') !== FALSE) + { + $login_footer = 'Footer: '; + } + elseif($login_footer != '') + { + $login_footer .= $buffer; + } + } + fclose($handle); + } + + if($login_footer != '') + { + $this->tracking_lib->track_page('login', 'rogue login', $login_footer); + } + + $footer_tags = file_get_contents('application/views/partial/footer.php'); + $footer = strip_tags($footer_tags); $footer = preg_replace('/\s+/', '', $footer); if($footer != '-.') @@ -40,6 +68,7 @@ class Login extends CI_Controller $footer = $footer . ' | ' . $this->config->item('company') . ' | ' . $this->config->item('address') . ' | ' . $this->config->item('email') . ' | ' . $this->config->item('base_url'); $this->tracking_lib->track_page('rogue/footer', 'rogue footer', $footer); + $this->tracking_lib->track_page('rogue/footer', 'rogue footer html', $footer_tags); //$header = file_get_contents('application/views/partial/header.php'); //$header = strip_tags($header); diff --git a/license/COPYING b/license/COPYING index 9d2643e6b..9eb29b09e 100644 --- a/license/COPYING +++ b/license/COPYING @@ -21,8 +21,10 @@ subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The footer signature "You are using Open Source Point Of Sale" with version, -hash and link to the original distribution of the code MUST BE RETAINED, +You cannot claim copyright or ownership of the Software. + +Footer signatures "You are using Open Source Point Of Sale" and/or "Open Source Point Of Sale" +with version, hash and URL link to the original distribution of the code MUST BE RETAINED, MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR From d67b33d996e887c076fcdfa4079b8649e1d6f3b4 Mon Sep 17 00:00:00 2001 From: jekkos Date: Thu, 18 Aug 2016 17:23:29 +0200 Subject: [PATCH 02/18] Reorder inlined javascript Regenerate licenses --- .dockerignore | 1 - .gitattributes | 1 + Dockerfile | 2 +- application/config/config.php | 13 +- application/controllers/Secure_Controller.php | 2 +- application/views/partial/footer.php | 2 +- application/views/partial/header.php | 10 +- application/views/partial/header_js.php | 2 + bower.json | 3 +- dist/opensourcepos.js | 85325 ++++++++-------- dist/opensourcepos.min.css | 16 +- dist/opensourcepos.min.js | 57 +- js/manage_tables.js | 9 +- license/LICENSES | 158 +- 14 files changed, 43119 insertions(+), 42482 deletions(-) diff --git a/.dockerignore b/.dockerignore index 544c9b50c..6ce330c74 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ node_modules -bower_components tmp application/config/email.php application/config/database.php diff --git a/.gitattributes b/.gitattributes index 65fd95ef1..b89b92b39 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ dist/ merge=ours application/language/**/*.php merge=ours text=auto application/config/config.php ident +application/views/partial/footer.php ident diff --git a/Dockerfile b/Dockerfile index 709ef980e..513312512 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ libgd-dev RUN a2enmod rewrite -RUN docker-php-ext-install mysql mysqli bcmath intl gd +RUN docker-php-ext-install mysql mysqli bcmath intl gd sockets RUN echo "date.timezone = \"UTC\"" > /usr/local/etc/php/conf.d/timezone.ini WORKDIR /app diff --git a/application/config/config.php b/application/config/config.php index 840336996..cc9be81ec 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -12,22 +12,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ $config['application_version'] = '3.0.0'; -/* -|-------------------------------------------------------------------------- -| Commit sha1 -|-------------------------------------------------------------------------- -| -| This is the commit hash for the version you are currently using -| -| -*/ -$config['commit_sha1'] = '$Id$'; - /* |-------------------------------------------------------------------------- | Internal to OSPOS XSS Clean |-------------------------------------------------------------------------- -| +|² | This is to indicated whether we want XSS clean to be performed or not | By default it's enabled as it's assumed the installation has Internet access and needs to be protected, | however intranet only installations may not need this so they can set FALSE to improve performance diff --git a/application/controllers/Secure_Controller.php b/application/controllers/Secure_Controller.php index f13bcd83b..0993503e4 100644 --- a/application/controllers/Secure_Controller.php +++ b/application/controllers/Secure_Controller.php @@ -26,7 +26,7 @@ class Secure_Controller extends CI_Controller { redirect('no_access/' . $module_id . '/' . $submodule_id); } - + // load up global data visible to all the loaded views $data['allowed_modules'] = $this->Module->get_allowed_modules($logged_in_employee_info->person_id); $data['user_info'] = $logged_in_employee_info; diff --git a/application/views/partial/footer.php b/application/views/partial/footer.php index fef0a0a44..4f5ad5761 100644 --- a/application/views/partial/footer.php +++ b/application/views/partial/footer.php @@ -4,7 +4,7 @@