Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgraded Required PHP Version to 7.4 #15

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Supported Versions
Versions that are currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 1.7.15.1 | :white_check_mark: |
| <= 1.7.13 | :x: |
| Version | Supported |
| ------- | ------------------ |
| 1.7.15.2 | :white_check_mark: |
| <= 1.7.15.1 | :x: |

## Reporting a Vulnerability

Expand Down
4 changes: 2 additions & 2 deletions blueprint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"landingPage": "\/wp-admin\/plugins.php",
"preferredVersions": {
"php": "8.0",
"php": "7.4",
"wp": "latest"
},
"phpExtensionBundles": [
Expand All @@ -15,7 +15,7 @@
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https:\/\/downloads.wordpress.org\/plugin\/cooked.1.7.16.zip"
"url": "https:\/\/downloads.wordpress.org\/plugin\/cooked.1.7.15.2.zip"
},
"options": {
"activate": true
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require": {
"php": ">=7.4.0",
"nxp/math-executor": "^2.3"
}
}
21 changes: 11 additions & 10 deletions composer.lock

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

4 changes: 2 additions & 2 deletions cooked.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Description: A recipe plugin for WordPress.
Author: Boxy Studio
Author URI: https://boxystudio.com
Version: 1.7.16
Version: 1.7.15.2
Text Domain: cooked
Domain Path: languages
License: GPL2
Expand All @@ -30,7 +30,7 @@

require_once __DIR__ . '/vendor/autoload.php';

define( 'COOKED_VERSION', '1.7.16' );
define( 'COOKED_VERSION', '1.7.15.2' );
define( 'COOKED_DEV', true );

if ( ! class_exists( 'Cooked_Plugin' ) ) :
Expand Down
24 changes: 12 additions & 12 deletions includes/class.cooked-recipes.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ public function filter_recipes_by_taxonomy() {
$selected = isset($_GET[$taxonomy]) ? sanitize_title($_GET[$taxonomy]) : '';
$info_taxonomy = get_taxonomy($taxonomy);
$taxonomy_label = $info_taxonomy->label;

/* translators: For showing "All" of a taxonomy (ex: "All Burgers") */
$all_string = sprintf( esc_html__( "All %s", "cooked" ), $taxonomy_label );

wp_dropdown_categories(array(
'show_option_all' => $all_string,
'taxonomy' => $taxonomy,
Expand Down Expand Up @@ -750,19 +750,19 @@ public static function serving_size_switcher( $servings ){
$half = $default / 2;
$double = $default * 2;
$triple = $default * 3;

/* translators: singular and plural quarter "serving" size */
$quarter_string = sprintf( esc_html( _n('Quarter (%s Serving)','Quarter (%s Servings)',$quarter,'cooked')),$quarter );

/* translators: singular and plural quarter "serving" size */
$half_string = sprintf( esc_html( _n('Half (%s Serving)','Half (%s Servings)',$half,'cooked')),$half );

/* translators: singular and plural quarter "serving" size */
$default_string = sprintf( esc_html( _n('Default (%s Serving)','Default (%s Servings)',$default,'cooked')),$default );

/* translators: singular and plural quarter "serving" size */
$double_string = sprintf( esc_html__( 'Double (%s Servings)','cooked'),$double );

/* translators: singular and plural quarter "serving" size */
$triple_string = sprintf( esc_html__( 'Triple (%s Servings)','cooked'),$triple );

Expand All @@ -780,14 +780,14 @@ public static function serving_size_switcher( $servings ){
echo '<span class="cooked-servings"><span class="cooked-servings-icon"><i class="cooked-icon cooked-icon-recipe-icon"></i></span>';
echo '<strong class="cooked-meta-title">' . esc_html__('Yields','cooked') . '</strong>';
if ( !$printing && !$switcher_disabled ):

/* translators: singular and plural "serving" sizes */
$servings_string = sprintf( esc_html( _n( '%s Serving', '%s Servings', $servings, 'cooked' ) ), $servings );

echo '<a href="#">' . $servings_string . '</a>';
echo '<select name="servings" class="cooked-servings-changer">';
foreach ( $servings_array as $stype ):
echo '<option value="' . ( $default == $stype['value'] ? remove_query_arg( 'servings', get_permalink() ) : add_query_arg( 'servings', $stype['value'], get_permalink() ) ) . '"' . ( $stype['value'] == $servings ? ' selected' : '' ) . '>' . esc_attr( $stype['name'] ) . '</option>';
echo '<option value="' . $stype['value'] . '"' . ( $stype['value'] == $servings ? ' selected' : '' ) . '>' . esc_attr( $stype['name'] ) . '</option>';
endforeach;
echo '</select>';
else:
Expand Down Expand Up @@ -892,10 +892,10 @@ public static function single_direction( $dir, $number = false, $plain_text = fa
if ( $plain_text ):
return $content;
else:

/* translators: singular and plural "steps" */
$step_string = sprintf( esc_html__( 'Step %d', 'cooked' ), $step );

echo '<div class="cooked-single-direction cooked-direction' . ( $image ? ' cooked-direction-has-image' : '' ) . ( $number ? ' cooked-direction-has-number' . ( $number > 9 ? '-wide' : '' ) : '' ) . '"' . ( $step ? ' data-step="' . $step_string . '"' : '' ) . '>';
echo ( $number ? '<span class="cooked-direction-number">' . esc_html($number) . '</span>' : '' );
echo '<div class="cooked-dir-content">' . do_shortcode( $content ) . ( $image ? wpautop( $image ) : '' ) . '</div>';
Expand Down
12 changes: 7 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: boxystudio, xjsv
Tags: recipe, recipes, food, cooking, nutrition
Requires at least: 4.7
Tested up to: 6.5
Stable tag: 1.7.16
Tested up to: 6.5.2
Stable tag: 1.7.15.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -75,12 +75,14 @@ Be sure to check the [Cooked Documentation](http://docs.cooked.pro/collection/1-

== Upgrade Notice ==

Version 1.7.15.1 fixes the CVE-2023-44477 Auth. (contributor+) Stored Cross-Site Scripting (XSS) vulnerability.
Version 1.7.15.2 is a hotfix to correct the composer platform error issue.

== Changelog ==

= 1.7.16 =
* Security improvements.
= 1.7.15.2 =
* **FIX:** Composer detected issues in your platform error discovered by @ianrlp.
* **FIX:** PHP undefined variable $hours_left discovered and fixed by @addyh.
* **TWEAK:** Security improvements thanks to @addyh.

= 1.7.15.1 =
* **FIX:** Addressed the CVE-2023-44477 security vulnerability.
Expand Down
17 changes: 8 additions & 9 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@
"packages": [
{
"name": "nxp/math-executor",
"version": "v2.3.6",
"version_normalized": "2.3.6.0",
"version": "v2.3.2",
"version_normalized": "2.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/neonxp/MathExecutor.git",
"reference": "dca855e25f8ba6ab019c2fe9bd8065d4713d00de"
"reference": "c59f4cd15317754d2b50bd4bff2243012e815790"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/neonxp/MathExecutor/zipball/dca855e25f8ba6ab019c2fe9bd8065d4713d00de",
"reference": "dca855e25f8ba6ab019c2fe9bd8065d4713d00de",
"url": "https://api.github.com/repos/neonxp/MathExecutor/zipball/c59f4cd15317754d2b50bd4bff2243012e815790",
"reference": "c59f4cd15317754d2b50bd4bff2243012e815790",
"shasum": ""
},
"require": {
"php": ">=8.0 <8.4"
"php": ">=7.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.8",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": ">=9.0"
},
"time": "2024-02-15T22:51:27+00:00",
"time": "2022-12-08T16:15:34+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -57,7 +56,7 @@
],
"support": {
"issues": "https://github.com/neonxp/MathExecutor/issues",
"source": "https://github.com/neonxp/MathExecutor/tree/v2.3.6"
"source": "https://github.com/neonxp/MathExecutor/tree/v2.3.2"
},
"install-path": "../nxp/math-executor"
}
Expand Down
18 changes: 9 additions & 9 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php return array(
'root' => array(
'name' => '__root__',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => null,
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '75dca48e2d226d4b55dabb6ee423531200c8e694',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'__root__' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => null,
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '75dca48e2d226d4b55dabb6ee423531200c8e694',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'nxp/math-executor' => array(
'pretty_version' => 'v2.3.6',
'version' => '2.3.6.0',
'reference' => 'dca855e25f8ba6ab019c2fe9bd8065d4713d00de',
'pretty_version' => 'v2.3.2',
'version' => '2.3.2.0',
'reference' => 'c59f4cd15317754d2b50bd4bff2243012e815790',
'type' => 'library',
'install_path' => __DIR__ . '/../nxp/math-executor',
'aliases' => array(),
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/platform_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

$issues = array();

if (!(PHP_VERSION_ID >= 80000)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 70400)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
}

if ($issues) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/nxp/math-executor/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1, 8.0]
php: [8.2, 8.1, 8.0, 7.4]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest, windows-latest]

Expand Down
1 change: 0 additions & 1 deletion vendor/nxp/math-executor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
vendor/
.idea/
composer.lock
.phpunit.cache
.phpunit.result.cache
.vscode
.php-cs-fixer.cache
Expand Down
10 changes: 5 additions & 5 deletions vendor/nxp/math-executor/.php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
// PHP code must use the long `<?php` tags or short-echo `<?=` tags and not other tag variations.
'full_opening_tag' => true,
// Spaces should be properly placed in a function declaration.
'function_declaration' => ['closure_function_spacing'=>'none', 'closure_fn_spacing'=>'none'],
'function_declaration' => ['closure_function_spacing'=>'none'],
// Replace core functions calls returning constants with the constants.
'function_to_constant' => true,
// Ensure single space between function's argument and its typehint.
'type_declaration_spaces' => true,
'function_typehint_space' => true,
// Renames PHPDoc tags.
'general_phpdoc_tag_rename' => true,
// Function `implode` must be called with 2 arguments in the documented order.
Expand Down Expand Up @@ -148,6 +148,8 @@
'no_short_bool_cast' => true,
// When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis.
'no_spaces_after_function_name' => true,
// There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.
'no_spaces_inside_parenthesis' => true,
// Removes `@param`, `@return` and `@var` tags that don't provide any useful information.
'no_superfluous_phpdoc_tags' => true,
// Remove trailing whitespace at the end of non-blank lines.
Expand Down Expand Up @@ -227,7 +229,7 @@
// A PHP file without end tag must always end with a single empty line feed.
'single_blank_line_at_eof' => true,
// There should be exactly one blank line before a namespace declaration.
'blank_lines_before_namespace' => ['max_line_breaks' => 2, 'min_line_breaks' => 2],
'single_blank_line_before_namespace' => true,
// There MUST NOT be more than one property or constant declared per statement.
'single_class_element_per_statement' => true,
// There MUST be one use keyword per declaration.
Expand All @@ -240,8 +242,6 @@
'single_quote' => true,
// Each trait `use` must be done as single statement.
'single_trait_insert_per_statement' => true,
// There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.
'spaces_inside_parentheses' => false,
// Replace all `<>` with `!=`.
'standardize_not_equals' => true,
// Lambdas not (indirect) referencing `$this` must be declared `static`.
Expand Down
Loading