Git Product home page Git Product logo

portable-ascii's Introduction

SWUbanner

Build Status Build status codecov.io Codacy Badge Latest Stable Version Total Downloads License Donate to this project using Paypal Donate to this project using Patreon

🔡 Portable ASCII

Description

It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your server.

The benefit of Portable ASCII is that it is easy to use, easy to bundle.

The project based on ...

Index

Alternative

If you like a more Object Oriented Way to edit strings, then you can take a look at voku/Stringy, it's a fork of "danielstjules/Stringy" but it used the "Portable ASCII"-Class and some extra methods.

// Portable ASCII
use voku\helper\ASCII;
ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii'

// voku/Stringy
use Stringy\Stringy as S;
$stringy = S::create('déjà σσς iıii');
$stringy->toTransliterate();              // 'deja sss iiii'

Install "Portable ASCII" via "composer require"

composer require voku/portable-ascii

Why Portable ASCII?

I need ASCII char handling in different classes and before I added this functions into "Portable UTF-8", but this repo is more modular and portable, because it has no dependencies.

Requirements and Recommendations

  • No extensions are required to run this library. Portable ASCII only needs PCRE library that is available by default since PHP 4.2.0 and cannot be disabled since PHP 5.3.0. "\u" modifier support in PCRE for ASCII handling is not a must.
  • PHP 7.0 is the minimum requirement
  • PHP 8.0 is also supported

Usage

Example: ASCII::to_ascii()

  echo ASCII::to_ascii('�Düsseldorf�', 'de');
  
  // will output
  // Duesseldorf

  echo ASCII::to_ascii('�Düsseldorf�', 'en');
  
  // will output
  // Dusseldorf

Portable ASCII | API

The API from the "ASCII"-Class is written as small static methods.

Class methods

charsArray charsArrayWithMultiLanguageValues charsArrayWithOneLanguage charsArrayWithSingleLanguageValues
clean getAllLanguages is_ascii normalize_msword
normalize_whitespace remove_invisible_characters to_ascii to_ascii_remap
to_filename to_slugify to_transliterate

charsArray(bool $replace_extra_symbols): array

Returns an replacement array for ASCII methods.

EXAMPLE: $array = ASCII::charsArray(); var_dump($array['ru']['б']); // 'b'

Parameters:

  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>

Return:

  • array

charsArrayWithMultiLanguageValues(bool $replace_extra_symbols): array

Returns an replacement array for ASCII methods with a mix of multiple languages.

EXAMPLE: $array = ASCII::charsArrayWithMultiLanguageValues(); var_dump($array['b']); // ['β', 'б', 'ဗ', 'ბ', 'ب']

Parameters:

  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>

Return:

  • array <p>An array of replacements.</p>

charsArrayWithOneLanguage(string $language, bool $replace_extra_symbols, bool $asOrigReplaceArray): array

Returns an replacement array for ASCII methods with one language.

For example, German will map 'ä' to 'ae', while other languages will simply return e.g. 'a'.

EXAMPLE: $array = ASCII::charsArrayWithOneLanguage('ru'); $tmpKey = \array_search('yo', $array['replace']); echo $array['orig'][$tmpKey]; // 'ё'

Parameters:

  • ASCII::* $language [optional] <p>Language of the source string e.g.: en, de_at, or de-ch. (default is 'en') | ASCII::*_LANGUAGE_CODE</p>
  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>
  • bool $asOrigReplaceArray [optional] <p>TRUE === return {orig: string[], replace: string[]} array</p>

Return:

  • array <p>An array of replacements.</p>

charsArrayWithSingleLanguageValues(bool $replace_extra_symbols, bool $asOrigReplaceArray): array

Returns an replacement array for ASCII methods with multiple languages.

EXAMPLE: $array = ASCII::charsArrayWithSingleLanguageValues(); $tmpKey = \array_search('hnaik', $array['replace']); echo $array['orig'][$tmpKey]; // '၌'

Parameters:

  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>
  • bool $asOrigReplaceArray [optional] <p>TRUE === return {orig: string[], replace: string[]} array</p>

Return:

  • array <p>An array of replacements.</p>

clean(string $str, bool $normalize_whitespace, bool $keep_non_breaking_space, bool $normalize_msword, bool $remove_invisible_characters): string

Accepts a string and removes all non-UTF-8 characters from it + extras if needed.

Parameters:

  • string $str <p>The string to be sanitized.</p>
  • bool $normalize_whitespace [optional] <p>Set to true, if you need to normalize the whitespace.</p>
  • bool $keep_non_breaking_space [optional] <p>Set to true, to keep non-breaking-spaces, in combination with $normalize_whitespace</p>
  • bool $normalize_msword [optional] <p>Set to true, if you need to normalize MS Word chars e.g.: "…" => "..."</p>
  • bool $remove_invisible_characters [optional] <p>Set to false, if you not want to remove invisible characters e.g.: "\0"</p>

Return:

  • string <p>A clean UTF-8 string.</p>

getAllLanguages(): string[]

Get all languages from the constants "ASCII::.*LANGUAGE_CODE".

Parameters: nothing

Return:

  • string[]

is_ascii(string $str): bool

Checks if a string is 7 bit ASCII.

EXAMPLE: ASCII::is_ascii('白'); // false

Parameters:

  • string $str <p>The string to check.</p>

Return:

  • `bool

    true if it is ASCII
    false otherwise

`

normalize_msword(string $str): string

Returns a string with smart quotes, ellipsis characters, and dashes from Windows-1252 (commonly used in Word documents) replaced by their ASCII equivalents.

EXAMPLE: ASCII::normalize_msword('„Abcdef…”'); // '"Abcdef..."'

Parameters:

  • string $str <p>The string to be normalized.</p>

Return:

  • string <p>A string with normalized characters for commonly used chars in Word documents.</p>

normalize_whitespace(string $str, bool $keepNonBreakingSpace, bool $keepBidiUnicodeControls, bool $normalize_control_characters): string

Normalize the whitespace.

EXAMPLE: ASCII::normalize_whitespace("abc-\xc2\xa0-öäü-\xe2\x80\xaf-\xE2\x80\xAC", true); // "abc-\xc2\xa0-öäü- -"

Parameters:

  • string $str <p>The string to be normalized.</p>
  • bool $keepNonBreakingSpace [optional] <p>Set to true, to keep non-breaking-spaces.</p>
  • bool $keepBidiUnicodeControls [optional] <p>Set to true, to keep non-printable (for the web) bidirectional text chars.</p>
  • bool $normalize_control_characters [optional] <p>Set to true, to convert e.g. LINE-, PARAGRAPH-SEPARATOR with "\n" and LINE TABULATION with "\t".</p>

Return:

  • string <p>A string with normalized whitespace.</p>

remove_invisible_characters(string $str, bool $url_encoded, string $replacement, bool $keep_basic_control_characters): string

Remove invisible characters from a string.

e.g.: This prevents sandwiching null characters between ascii characters, like Java\0script.

copy&past from https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/Common.php

Parameters:

  • string $str
  • bool $url_encoded
  • string $replacement
  • bool $keep_basic_control_characters

Return:

  • string

to_ascii(string $str, string $language, bool $remove_unsupported_chars, bool $replace_extra_symbols, bool $use_transliterate, bool|null $replace_single_chars_only): string

Returns an ASCII version of the string. A set of non-ASCII characters are replaced with their closest ASCII counterparts, and the rest are removed by default. The language or locale of the source string can be supplied for language-specific transliteration in any of the following formats: en, en_GB, or en-GB. For example, passing "de" results in "äöü" mapping to "aeoeue" rather than "aou" as in other languages.

EXAMPLE: ASCII::to_ascii('�Düsseldorf�', 'en'); // Dusseldorf

Parameters:

  • string $str <p>The input string.</p>
  • ASCII::* $language [optional] <p>Language of the source string. (default is 'en') | ASCII::*_LANGUAGE_CODE</p>
  • bool $remove_unsupported_chars [optional] <p>Whether or not to remove the unsupported characters.</p>
  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>
  • bool $use_transliterate [optional] <p>Use ASCII::to_transliterate() for unknown chars.</p>
  • bool|null $replace_single_chars_only [optional] <p>Single char replacement is better for the performance, but some languages need to replace more then one char at the same time. | NULL === auto-setting, depended on the language</p>

Return:

  • string <p>A string that contains only ASCII characters.</p>

to_ascii_remap(string $str1, string $str2): string[]

WARNING: This method will return broken characters and is only for special cases.

Convert two UTF-8 encoded string to a single-byte strings suitable for functions that need the same string length after the conversion.

The function simply uses (and updates) a tailored dynamic encoding (in/out map parameter) where non-ascii characters are remapped to the range [128-255] in order of appearance.

Parameters:

  • string $str1
  • string $str2

Return:

  • string[]

to_filename(string $str, bool $use_transliterate, string $fallback_char): string

Convert given string to safe filename (and keep string case).

EXAMPLE: ASCII::to_filename('שדגשדג.png', true)); // 'shdgshdg.png'

Parameters:

  • string $str
  • bool $use_transliterate <p>ASCII::to_transliterate() is used by default - unsafe characters are simply replaced with hyphen otherwise.</p>
  • string $fallback_char

Return:

  • string <p>A string that contains only safe characters for a filename.</p>

to_slugify(string $str, string $separator, string $language, string[] $replacements, bool $replace_extra_symbols, bool $use_str_to_lower, bool $use_transliterate): string

Converts the string into an URL slug. This includes replacing non-ASCII characters with their closest ASCII equivalents, removing remaining non-ASCII and non-alphanumeric characters, and replacing whitespace with $separator. The separator defaults to a single dash, and the string is also converted to lowercase. The language of the source string can also be supplied for language-specific transliteration.

Parameters:

  • string $str
  • string $separator [optional] <p>The string used to replace whitespace.</p>
  • ASCII::* $language [optional] <p>Language of the source string. (default is 'en') | ASCII::*_LANGUAGE_CODE</p>
  • array<string, string> $replacements [optional] <p>A map of replaceable strings.</p>
  • bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>
  • bool $use_str_to_lower [optional] <p>Use "string to lower" for the input.</p>
  • bool $use_transliterate [optional] <p>Use ASCII::to_transliterate() for unknown chars.</p>

Return:

  • string <p>A string that has been converted to an URL slug.</p>

to_transliterate(string $str, string|null $unknown, bool $strict): string

Returns an ASCII version of the string. A set of non-ASCII characters are replaced with their closest ASCII counterparts, and the rest are removed unless instructed otherwise.

EXAMPLE: ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii'

Parameters:

  • string $str <p>The input string.</p>
  • string|null $unknown [optional] <p>Character use if character unknown. (default is '?') But you can also use NULL to keep the unknown chars.</p>
  • bool $strict [optional] <p>Use "transliterator_transliterate()" from PHP-Intl

Return:

  • string <p>A String that contains only ASCII characters.</p>

Unit Test

  1. Composer is a prerequisite for running the tests.
composer install
  1. The tests can be executed by running this command from the root directory:
./vendor/bin/phpunit

Support

For support and donations please visit Github | Issues | PayPal | Patreon.

For status updates and release announcements please visit Releases | Twitter | Patreon.

For professional support please contact me.

Thanks

  • Thanks to GitHub (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
  • Thanks to IntelliJ as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
  • Thanks to Travis CI for being the most awesome, easiest continous integration tool out there!
  • Thanks to StyleCI for the simple but powerful code style check.
  • Thanks to PHPStan && Psalm for really great Static analysis tools and for discover bugs in the code!

License and Copyright

Released under the MIT License - see LICENSE.txt for details.

portable-ascii's People

Contributors

andr1yk0 avatar andreasschroth avatar daryush avatar deepsource-io[bot] avatar dillingham avatar eliyas5044 avatar frost-cyber avatar grahamcampbell avatar ilyahoilik avatar mardep avatar mend-bolt-for-github[bot] avatar mkosturkov avatar nyholm avatar peter279k avatar renovate-bot avatar stylecibot avatar voku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

portable-ascii's Issues

[DE] MacOS (Big Sur or M1) uses multi character German umlaute

What is this feature about (expected vs actual behaviour)?

MacOS filesystem replaces German (single character) umlaute with a two characters since Big Sur or only on M1 machines.
These are replaced with a simple a instead of ae. Expected behavior would be to replace these combined characters the same way as the single character umlaute are treated.

How can I reproduce it?

  • create a new file or folder with ä, ö or ü - persist the filename (ENTER)
  • open the filename change dialog and copy the shown ä/ö/ü character
  • run it through the ASCII class

The real-world scenario would be to sanitize an uploaded filename.

Does it take minutes, hours or days to fix?

The local fix took minutes (added a str_replace() before running the ASCII conversion) but no idea how much it will take to properly add it to the package.

Any additional information?

In hope that GitHub doesn't replace the characters - here it is - the codepoints are U+61 U+308.
https://www.fileformat.info/info/unicode/char/61/index.htm
https://www.fileformat.info/info/unicode/char/308/index.htm

I'm not sure if this would be the expected behavior of the package or I want it to do something that's not in the scope of that package. We have a working solution right now - so it's in no way urgent.

German transcription with plural is wrong

According to your description:

For example, German will map 'ä' to 'ae', while other languages will simply return e.g. 'a'.

this is wrong.
Example:
1 Apfel ( 1 Aple ) > nothing to convert
2 Äpfel (2 Apples) > you will convert Ä to A which is wrong because with an A only the 2 Apples become 1 Apple.
Maybe this sample is a bit hard to understand, but 1 Apfel = 1 Apple , 2 (or more) Äpfel are more Apples.
The only difference is the first letter, either an A or an Ä

Same will be with your sample Düsseldorf, converting it to en for example will translate Düsseldorf to Dusseldorf where it should be in all other languages than German Duesseldorf!
Dusseldorf may also exist as a town somewhere in Europe, if not Dussel means something very special in German (some stupid).

Translating German into other languages, especially for SEO-URLs is not that easy as it looks!
Please recheck and rework your framework, if it will handle such cases also correct, it could be useful.

Turn this package into a polyfill for transliterator_transliterate()

Hi there!

In case you missed it, I'm working on abandoning patchwork/utf8 in favor of symfony/symfony#33553 In this PR, I'm using transliterator_transliterate() to implement UTF-8 to ASCII transliterations (see AbstractUnicodeString::ascii()). But when the intl extension is not installed, I just skip the call and fallback to NFKC + maps + iconv.

It would be super cool if we could polyfill this function from intl (a subset of its behavior at least). This package is the closest I know. Would you consider porting it to https://github.com/symfony/polyfill/tree/master/src/Intl?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

composer
build/composer.json
  • voku/php-readme-helper ~0.6
composer.json
  • php >=7.0.0
  • phpunit/phpunit ~6.0 || ~7.0 || ~9.0
github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • shivammathur/setup-php 2.17.1
  • actions/cache v2.1.7
  • codecov/codecov-action v2
  • actions/upload-artifact v3

  • Check this box to trigger a request for Renovate to run again on this repository

CVE-2020-11023 (Medium) detected in jquery-3.3.1.min.js

CVE-2020-11023 - Medium Severity Vulnerability

Vulnerable Library - jquery-3.3.1.min.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js

Path to vulnerable library: /vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js

Dependency Hierarchy:

  • jquery-3.3.1.min.js (Vulnerable Library)

Found in HEAD commit: 5f194d2b2d1490498ccef38efc358148119355c9

Found in base branch: master

Vulnerability Details

In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing HTML containing elements from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

Publish Date: 2020-04-29

URL: CVE-2020-11023

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6,https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md#440

Release Date: 2020-04-29

Fix Resolution: jquery - 3.5.0;jquery-rails - 4.4.0


Step up your Open Source Security Game with WhiteSource here

Issue compared to original stringy

I've replaced (locally) Laravel's Str::ascii with a call to this package, however some of the results are not quite as expected. For example, the following test fails:

$this->assertSame('h H sht SHT a A y Y', Str::ascii('х Х щ Щ ъ Ъ ь Ь', 'bg'));
Failed asserting that two strings are identical.

--- Expected
+++ Actual
@@ @@
-'h H sht SHT a A y Y'
+'h H sht Sht a A  '

Package size

The recent release growed in size by ~45000 lines because of 5417140

We bundle the lib with our cms and it makes a big portion of our overall application size, see redaxo/redaxo#3662

Do you have any recommendations/suggestions on how we could save in filesize?
Maybe we can reduce the size of the data folder when we do some assumptions?

Update v1.6.0 broke Laravel's builds

What is this feature about (expected vs actual behaviour)?

Seems like release v1.6.0 broke Laravel's build and subsequently all PR's that are sent in since are failing as well: https://github.com/laravel/framework/runs/4920401730?check_suite_focus=true#step:8:138

It seems most likely that this commit is the culprit: acaf868

Changing the behaviour here seems like a breaking change to me and should probably be done in a major release?

How can I reproduce it?

voku\helper\ASCII::to_ascii('пиздюк.txt');

Expected output: pizdyuk.txt (pre 1.6.0)
Given output: pizdiuk.txt (as of 1.6.0)

Does it take minutes, hours or days to fix?

Think this is an easy fix by just rolling back the commit and tagging a new patch release.

Tag 1.4.11

The current diff is pretty much only docs. But there is one super small change in composer.json.

Currently master contains a fix to a bug that makes my CI red. Could I please ask for a new patch release?

CVE-2020-11022 (Medium) detected in jquery-3.3.1.min.js

CVE-2020-11022 - Medium Severity Vulnerability

Vulnerable Library - jquery-3.3.1.min.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js

Path to vulnerable library: /vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js

Dependency Hierarchy:

  • jquery-3.3.1.min.js (Vulnerable Library)

Found in HEAD commit: 5f194d2b2d1490498ccef38efc358148119355c9

Found in base branch: master

Vulnerability Details

In jQuery versions greater than or equal to 1.2 and before 3.5.0, passing HTML from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

Publish Date: 2020-04-29

URL: CVE-2020-11022

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

Release Date: 2020-04-29

Fix Resolution: jQuery - 3.5.0


Step up your Open Source Security Game with WhiteSource here

CVE-2019-8331 (Medium) detected in bootstrap-4.1.3.min.js

CVE-2019-8331 - Medium Severity Vulnerability

Vulnerable Library - bootstrap-4.1.3.min.js

The most popular front-end framework for developing responsive, mobile first projects on the web.

Library home page: https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js

Path to vulnerable library: /vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js

Dependency Hierarchy:

  • bootstrap-4.1.3.min.js (Vulnerable Library)

Found in HEAD commit: 5f194d2b2d1490498ccef38efc358148119355c9

Found in base branch: master

Vulnerability Details

In Bootstrap before 3.4.1 and 4.3.x before 4.3.1, XSS is possible in the tooltip or popover data-template attribute.

Publish Date: 2019-02-20

URL: CVE-2019-8331

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: twbs/bootstrap#28236

Release Date: 2019-02-20

Fix Resolution: bootstrap - 3.4.1,4.3.1;bootstrap-sass - 3.4.1,4.3.1


Step up your Open Source Security Game with WhiteSource here

CVE-2019-11358 (Medium) detected in jquery-3.3.1.min.js

CVE-2019-11358 - Medium Severity Vulnerability

Vulnerable Library - jquery-3.3.1.min.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js

Path to vulnerable library: /vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js

Dependency Hierarchy:

  • jquery-3.3.1.min.js (Vulnerable Library)

Found in HEAD commit: 5f194d2b2d1490498ccef38efc358148119355c9

Found in base branch: master

Vulnerability Details

jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution. If an unsanitized source object contained an enumerable proto property, it could extend the native Object.prototype.

Publish Date: 2019-04-20

URL: CVE-2019-11358

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11358

Release Date: 2019-04-20

Fix Resolution: 3.4.0


Step up your Open Source Security Game with WhiteSource here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.