diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc9fcf7c..c144ef141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,37 +1,4 @@ -## Update changelog for Osclass 5.1.0 Release Notes {#release-notes-5-1-0} -* New: Backend is based on Bootstrap 5 -* New: Many changes are made to make it more user-friendly on small screens while keeping the same functionality -* New: System info page in the tools menu. -* New: form input class is introduced, which will be the new default for all form elements, soon a new API will be introduced to use it. -* New: Translations, from mindstellar/i10n-osclass -* New: Versions of translation can be downloaded from our repositories in the Osclass backend -* New: Language has info for text direction, which can be utilized by developers -* New: Translations for new languages -* New: Translated custom fields. They can be translated into the custom-field editor. -* New: open-in-new-tab option for URL type custom fields. -* New: Login as a user feature. Can be used to log in as another user. You'll find this option on the user edit page. Thanks, @dftd -* New: You can enable the allow-prerelease setting in the user dashboard to get new features and bug fixes and continue to test this version. -* Improvement: In osclass upgrade experience -* Improvement: Less dependency on JQuery-UI and other libraries, the goal is to remove them completely with native javascript or use bootstrap components -* Improvement: Major rewrite of old Jquery based code to Pure JS (Still lots to do) -* Improvement: Escape, Sanitize classes, and they are used now in many places -* Security: Many security flaws are fixed, thanks to new classes -* Improvement: Locations stats generation, on average a 10 x improvement in performance -* Improvement: Compatibility with older plugins but not for ones that use ancient DB access methods. -* Improvement: Huge reductions in PHP Notices and warnings with newer PHP versions -* Improvement: Now styles can be registered like you have registered scripts. -* Improvement: JS scripts can be enqueued in the middle of view and will be executed at the end of the page. -* Speed: Overall performance improvements and code refactoring to make it more stable and easier to maintain -* Speed: Database improvements, from 10x to 5x faster in some cases, reduced the query footprint in many cases -* Changed: Default DB engine from MyISAM to InnoDB for t_item_description table. -* Fixed: JS enqueued in the footer was not working in some cases. -* Fixed: Multilingual issue with the backend. -* Fixed: #400: Issues storing ipv6 addresses in a few places. -* Fixed: Fresh installation of Osclass does not work. -* Removed: the google-map plugin. as functionality is now provided by the core. -over 300 + commits since the last release -There is a lot more under the hood changes, which are not listed here, but you can see them in the commit log. - -Backend rewrite was a lot of work, but now it is finally done, and it is much more user-friendly. Many new components/APIs will be introduced in the future. So, if you are a developer, that'll make you happy. It was a marathon job for the last two to three months, and I am very happy with the result. I hope you will enjoy it. If you want to help or donate to support the project? Just buy me little coffee at https://www.paypal.com/paypalme/navjottomer, it will be great :) - +## Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0} +* Fixed a bug that prevented adding new custom fields in admin dashboard. +* Fixed a potential bug which could lead to core file deletion. Source: https://github.com/mindstellar/Osclass \ No newline at end of file diff --git a/ChangelogHistory.txt b/ChangelogHistory.txt index 21df8c07a..88b421618 100644 --- a/ChangelogHistory.txt +++ b/ChangelogHistory.txt @@ -1,3 +1,39 @@ +* New: Backend is based on Bootstrap 5 +* New: Many changes are made to make it more user-friendly on small screens while keeping the same functionality +* New: System info page in the tools menu. +* New: form input class is introduced, which will be the new default for all form elements, soon a new API will be introduced to use it. +* New: Translations, from mindstellar/i10n-osclass +* New: Versions of translation can be downloaded from our repositories in the Osclass backend +* New: Language has info for text direction, which can be utilized by developers +* New: Translations for new languages +* New: Translated custom fields. They can be translated into the custom-field editor. +* New: open-in-new-tab option for URL type custom fields. +* New: Login as a user feature. Can be used to log in as another user. You'll find this option on the user edit page. Thanks, @dftd +* New: You can enable the allow-prerelease setting in the user dashboard to get new features and bug fixes and continue to test this version. +* Improvement: In osclass upgrade experience +* Improvement: Less dependency on JQuery-UI and other libraries, the goal is to remove them completely with native javascript or use bootstrap components +* Improvement: Major rewrite of old Jquery based code to Pure JS (Still lots to do) +* Improvement: Escape, Sanitize classes, and they are used now in many places +* Security: Many security flaws are fixed, thanks to new classes +* Improvement: Locations stats generation, on average a 10 x improvement in performance +* Improvement: Compatibility with older plugins but not for ones that use ancient DB access methods. +* Improvement: Huge reductions in PHP Notices and warnings with newer PHP versions +* Improvement: Now styles can be registered like you have registered scripts. +* Improvement: JS scripts can be enqueued in the middle of view and will be executed at the end of the page. +* Speed: Overall performance improvements and code refactoring to make it more stable and easier to maintain +* Speed: Database improvements, from 10x to 5x faster in some cases, reduced the query footprint in many cases +* Changed: Default DB engine from MyISAM to InnoDB for t_item_description table. +* Fixed: JS enqueued in the footer was not working in some cases. +* Fixed: Multilingual issue with the backend. +* Fixed: #400: Issues storing ipv6 addresses in a few places. +* Fixed: Fresh installation of Osclass does not work. +* Removed: the google-map plugin. as functionality is now provided by the core. + over 300 + commits since the last release + There is a lot more under the hood changes, which are not listed here, but you can see them in the commit log. + +Backend rewrite was a lot of work, but now it is finally done, and it is much more user-friendly. Many new components/APIs will be introduced in the future. So, if you are a developer, that'll make you happy. It was a marathon job for the last two to three months, and I am very happy with the result. I hope you will enjoy it. If you want to help or donate to support the project? Just buy me little coffee at https://www.paypal.com/paypalme/navjottomer, it will be great :) + +Source: https://github.com/mindstellar/Osclass # Osclass 5.0.2 Changelog * Security Fix in custom fields, it is recommended to upgrade this version. diff --git a/SECURITY.md b/SECURITY.md index a7b225eb2..2ee72cdbc 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,4 +1,8 @@ -# Security Policy 🔒 +# Security Policy + +## Reporting a Vulnerability + +Please report security issues to `security@mindstellar.com`# Security Policy 🔒 ## Reporting a Vulnerability 🚨 diff --git a/oc-includes/vendor/bin/export-plural-rules~HEAD b/oc-includes/vendor/bin/export-plural-rules~HEAD new file mode 100644 index 000000000..0931ee5ac --- /dev/null +++ b/oc-includes/vendor/bin/export-plural-rules~HEAD @@ -0,0 +1,287 @@ +formula = $language->buildFormula(true); + + return $language; + }, + $languages + ); + } + if (isset(Enviro::$outputFilename)) { + echo call_user_func(array(Exporter::getExporterClassName(Enviro::$outputFormat), 'toFile'), $languages, Enviro::$outputFilename, array('us-ascii' => Enviro::$outputUSAscii)); + } else { + echo call_user_func(array(Exporter::getExporterClassName(Enviro::$outputFormat), 'toString'), $languages, array('us-ascii' => Enviro::$outputUSAscii)); + } +} catch (Exception $x) { + fprintf(STDERR, $x->getMessage() . "\n"); + fprintf(STDERR, "Trace:\n"); + fprintf(STDERR, $x->getTraceAsString() . "\n"); + die(4); +} + +die(0); + +/** + * Helper class to handle command line options. + */ +class Enviro +{ + /** + * Shall the output contain only US-ASCII characters? + * + * @var bool + */ + public static $outputUSAscii; + + /** + * The output format. + * + * @var string + */ + public static $outputFormat; + + /** + * Output file name. + * + * @var string + */ + public static $outputFilename; + + /** + * List of wanted language IDs; it not set: all languages will be returned. + * + * @var array|null + */ + public static $languages; + + /** + * Reduce the language list to the minimum common denominator. + * + * @var bool + */ + public static $reduce; + + /** + * Omit extra parenthesis in plural rule formulas. + * + * @var bool + */ + public static $noExtraParenthesis; + + /** + * Parse the command line options. + */ + public static function initialize() + { + global $argv; + self::$outputUSAscii = false; + self::$outputFormat = null; + self::$outputFilename = null; + self::$languages = null; + self::$reduce = null; + self::$noExtraParenthesis = false; + $exporters = Exporter::getExporters(); + if (isset($argv) && is_array($argv)) { + foreach ($argv as $argi => $arg) { + if ($argi === 0) { + continue; + } + if (is_string($arg)) { + $argLC = trim(strtolower($arg)); + switch ($argLC) { + case '-h': + case '--help': + self::showSyntax(); + die(0); + case '--us-ascii': + self::$outputUSAscii = true; + break; + case '--reduce=yes': + self::$reduce = true; + break; + case '--reduce=no': + self::$reduce = false; + break; + case '--parenthesis=yes': + self::$noExtraParenthesis = false; + break; + case '--parenthesis=no': + self::$noExtraParenthesis = true; + break; + default: + if (preg_match('/^--output=.+$/', $argLC)) { + if (isset(self::$outputFilename)) { + fprintf(STDERR, "The output file name has been specified more than once!\n"); + self::showSyntax(); + die(3); + } + list(, self::$outputFilename) = explode('=', $arg, 2); + self::$outputFilename = trim(self::$outputFilename); + } elseif (preg_match('/^--languages?=.+$/', $argLC)) { + list(, $s) = explode('=', $arg, 2); + $list = explode(',', $s); + if (is_array(self::$languages)) { + self::$languages = array_merge(self::$languages, $list); + } else { + self::$languages = $list; + } + } elseif (isset($exporters[$argLC])) { + if (isset(self::$outputFormat)) { + fprintf(STDERR, "The output format has been specified more than once!\n"); + self::showSyntax(); + die(3); + } + self::$outputFormat = $argLC; + } else { + fprintf(STDERR, "Unknown option: ${arg}\n"); + self::showSyntax(); + die(2); + } + break; + } + } + } + } + if (!isset(self::$outputFormat)) { + self::showSyntax(); + die(1); + } + if (isset(self::$languages)) { + self::$languages = array_values(array_unique(self::$languages)); + } + if (!isset(self::$reduce)) { + self::$reduce = isset(self::$languages) ? false : true; + } + } + + /** + * Write out the syntax. + */ + public static function showSyntax() + { + $basename = basename(__FILE__); + $exporters = array_keys(Exporter::getExporters(true)); + $exporterList = implode('|', $exporters); + fprintf(STDERR, <<[,,...]] [--reduce=yes|no] [--parenthesis=yes|no] [--output=] <${exporterList}> + +Where: + --help + show this help message. + + --us-ascii + if specified, the output will contain only US-ASCII characters. + + --languages(or --language) + export only the specified language codes. + Separate languages with commas; you can also use this argument + more than once; it's case insensitive and accepts both '_' and + '-' as locale chunks separator (eg we accept 'it_IT' as well as + 'it-it'). + --reduce + if set to yes the output won't contain languages with the same + base language and rules. + For instance nl_BE ('Flemish') will be omitted because it's the + same as nl ('Dutch'). + Defaults to 'no' if --languages is specified, to 'yes' otherwise. + --parenthesis + if set to no, extra parenthesis will be omitted in generated + plural rules formulas. + Those extra parenthesis are needed to create a PHP-compatible + formula. + Defaults to 'yes' + --output + if specified, the output will be saved to . If not + specified we'll output to standard output. + +Output formats + +EOT + ); + $len = max(array_map('strlen', $exporters)); + foreach ($exporters as $exporter) { + fprintf(STDERR, ' ' . str_pad($exporter, $len) . ': ' . Exporter::getExporterDescription($exporter) . "\n"); + } + fprintf(STDERR, "\n"); + } + + /** + * Reduce a language list to the minimum common denominator. + * + * @param Language[] $languages + * + * @return Language[] + */ + public static function reduce($languages) + { + for ($numChunks = 3; $numChunks >= 2; $numChunks--) { + $filtered = array(); + foreach ($languages as $language) { + $chunks = explode('_', $language->id); + $compatibleFound = false; + if (count($chunks) === $numChunks) { + $categoriesHash = serialize($language->categories); + $otherIds = array(); + $otherIds[] = $chunks[0]; + for ($k = 2; $k < $numChunks; $k++) { + $otherIds[] = $chunks[0] . '_' . $chunks[$numChunks - 1]; + } + + foreach ($languages as $check) { + foreach ($otherIds as $otherId) { + if (($check->id === $otherId) && ($check->formula === $language->formula) && (serialize($check->categories) === $categoriesHash)) { + $compatibleFound = true; + break; + } + } + if ($compatibleFound === true) { + break; + } + } + } + if (!$compatibleFound) { + $filtered[] = $language; + } + } + $languages = $filtered; + } + + return $languages; + } +}