Skip to content

Commit

Permalink
Merge pull request #744 from gburton/1.0.0.3
Browse files Browse the repository at this point in the history
1.0.0.3
  • Loading branch information
gburton committed Jul 11, 2019
2 parents d44b5ea + 04615bd commit 336bee8
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 13 deletions.
@@ -0,0 +1,18 @@
<?php
/*
Copyright (c) 2019, G Burton
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

define('MODULE_SECURITY_CHECK_GITHUB_TITLE', 'Github Directory');
define('MODULE_SECURITY_CHECK_GITHUB_DIRECTORY_EXISTS', 'Github directory exists at: ' . DIR_FS_CATALOG . '.github. You should delete this directory.');
36 changes: 36 additions & 0 deletions admin/includes/modules/security_check/github_directory.php
@@ -0,0 +1,36 @@
<?php
/*
Copyright (c) 2019, G Burton
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

class securityCheck_github_directory {
var $type = 'warning';

function __construct() {
global $language;

include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/security_check/github_directory.php');

$this->title = MODULE_SECURITY_CHECK_GITHUB_TITLE;
}

function pass() {
return !file_exists(DIR_FS_CATALOG . '.github');
}

function getMessage() {
return MODULE_SECURITY_CHECK_GITHUB_DIRECTORY_EXISTS;
}
}

9 changes: 9 additions & 0 deletions admin/version_check.php
Expand Up @@ -23,6 +23,15 @@
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.oscommerce.com/version/online_merchant/ce/phoenix/' . $major_version);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if ( file_exists(DIR_FS_CATALOG . 'includes/cacert.pem') ) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, DIR_FS_CATALOG . 'includes/cacert.pem');
}
else {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
}

$response = trim(curl_exec($ch));
curl_close($ch);

Expand Down
8 changes: 5 additions & 3 deletions advanced_search.php
Expand Up @@ -108,11 +108,13 @@ function check_form() {
</div>

<div class="modal fade" id="helpSearch" tabindex="-1" role="dialog" aria-labelledby="helpSearchLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="fas fa-times"></span></button>
<h4 class="h3 modal-title"><?php echo HEADING_SEARCH_HELP; ?></h4>
<h5 class="modal-title"><?php echo HEADING_SEARCH_HELP; ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true" class="fas fa-times"></span>
</button>
</div>
<div class="modal-body">
<p><?php echo TEXT_SEARCH_HELP; ?></p>
Expand Down
6 changes: 6 additions & 0 deletions create_account.php
Expand Up @@ -166,6 +166,8 @@

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}

$OSCOM_Hooks->call('siteWide', 'injectFormVerify');

if ($error == false) {
$sql_data_array = array('customers_firstname' => $firstname,
Expand Down Expand Up @@ -502,6 +504,10 @@
?>
</div>
</div>

<?php
echo $OSCOM_Hooks->call('siteWide', 'injectFormDisplay');
?>

<div class="buttonSet">
<div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fas fa-user', null, 'primary', null, 'btn-success btn-block btn-lg'); ?></div>
Expand Down
2 changes: 1 addition & 1 deletion custom.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion includes/languages/english.php
Expand Up @@ -226,4 +226,4 @@ function tep_date_raw($date, $reverse = false) {
define('MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION', '');

// noscript helper
define('TEXT_NOSCRIPT', '<p><strong>JavaScript seems to be disabled in your browser.</strong></p><p>You must have JavaScript enabled in your browser to utilize the functionality of this website.<br><a class="alert-link" href="https://www.enable-javascript.com/" target="_blank" rel="nofollow">Click here for instructions on enabling javascript in your browser</a>.');
define('TEXT_NOSCRIPT', '<p><strong>JavaScript seems to be disabled in your browser.</strong></p><p>You must have JavaScript enabled in your browser to utilize the functionality of this website.<br><a class="alert-link" href="https://www.enable-javascript.com/" target="_blank" rel="nofollow">Click here for instructions on enabling javascript in your browser</a>.</p>');
2 changes: 1 addition & 1 deletion includes/modules/boxes/bm_information.php
Expand Up @@ -35,7 +35,7 @@ function execute() {

$bm_information_links = null;
foreach (MODULE_BOXES_INFORMATION_BOX_DATA as $a => $b) {
$bm_information_links .= '<li class="list-group-item"><a href="' . tep_href_link($a) . '">' . $b . '</a></li>' . PHP_EOL;
$bm_information_links .= '<a class="list-group-item list-group-item-action" href="' . tep_href_link($a) . '">' . $b . '</a>' . PHP_EOL;
}

ob_start();
Expand Down
4 changes: 2 additions & 2 deletions includes/modules/boxes/templates/tpl_bm_information.php
@@ -1,8 +1,8 @@
<div class="card bm-information">
<div class="card-header"><?php echo MODULE_BOXES_INFORMATION_BOX_TITLE; ?></div>
<ul class="list-group list-group-flush">
<div class="list-group list-group-flush">
<?php echo $bm_information_links; ?>
</ul>
</div>
</div>

<?php
Expand Down
Expand Up @@ -137,7 +137,7 @@ function execute() {
while ($filterlist = tep_db_fetch_array($filterlist_query)) {
$options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
}
$output .= tep_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()" class="form-control input-sm"');
$output .= tep_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"');
$output .= tep_hide_session_id() . PHP_EOL;
$output .= '</form>' . PHP_EOL;
$output .= '</div><br class="d-block d-sm-none">' . PHP_EOL;
Expand Down
Expand Up @@ -72,7 +72,7 @@ function execute() {
}

$options_output .= '<div class="form-group row">' . PHP_EOL;
$options_output .= '<label for="input' . $products_options_name['products_options_id'] . '" class="col-form-label col-sm-3 text-left text-sm-right">' . $products_options_name['products_options_name'] . '</label>' . PHP_EOL;
$options_output .= '<label for="input_' . $products_options_name['products_options_id'] . '" class="col-form-label col-sm-3 text-left text-sm-right">' . $products_options_name['products_options_name'] . '</label>' . PHP_EOL;
$options_output .= '<div class="col-sm-9">' . PHP_EOL;
$options_output .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, $fr_required . 'id="input_' . $products_options_name['products_options_id'] . '"') . PHP_EOL;
$options_output .= $fr_input;
Expand Down
2 changes: 2 additions & 0 deletions includes/template_top.php
Expand Up @@ -12,6 +12,8 @@

$oscTemplate->buildBlocks();

$OSCOM_Hooks->call('siteWide', 'injectRedirects');

if (!$oscTemplate->hasBlocks('boxes_column_left')) {
$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}
Expand Down
2 changes: 1 addition & 1 deletion includes/version.php
@@ -1 +1 @@
1.0.0.2
1.0.0.3
2 changes: 1 addition & 1 deletion product_reviews.php
Expand Up @@ -69,7 +69,7 @@
?>

<div class="text-center">
<?php echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '">' . tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>
<?php echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '">' . tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?>

<p><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'fas fa-shopping-cart', tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now'), null, null, 'btn-success btn-reviews btn-buy'); ?></p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion product_reviews_write.php
Expand Up @@ -98,7 +98,7 @@
?>

<div class="text-center">
<?php echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '">' . tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>
<?php echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '">' . tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?>
</div>

<div class="w-100"></div>
Expand Down

0 comments on commit 336bee8

Please sign in to comment.