youtube-dl/test
Kevin O'Connor 4eda10499e
[utils] Don't attempt to coerce JS strings to numbers in js_to_json (#26851)
The current logic in `js_to_json` tries to rewrite octal/hex numbers to
decimal. However, when the logic actually happens the `"` or `'` have
already been trimmed off. This causes what were originally strings, that
happen to look like octal/hex numbers, to get rewritten to decimal and
returned as a number rather than a string.

In practive something like:

```js
{
  "0x40": "foo",
  "040": "bar",
}
```

would get rewritten as:

```json
{
  64: "foo",
  32: "bar
}
```

This is problematic since this isn't valid JSON as you cannot have
non-string keys.
2020-10-18 00:10:41 +07:00
..
swftests [swfinterp] Add more builtins and improve static variables 2014-11-17 07:54:06 +01:00
testdata [utils] Improve cookie files support 2020-05-05 04:21:25 +07:00
__init__.py Add support for single-test tox runs 2013-10-12 13:17:11 -04:00
helper.py [test/helper] Add support for maxcount and count collection len test checkers 2019-01-16 02:17:49 +07:00
parameters.json Remove the --max-quality option 2015-04-25 11:59:54 +02:00
test_InfoExtractor.py [extractor/common] Improve HTML5 entries extraction and add some realworld tests 2019-03-17 09:09:32 +07:00
test_YoutubeDL.py [test_YoutubeDL] Add tests for #10591 (closes #23873) 2020-02-15 03:37:31 +07:00
test_YoutubeDLCookieJar.py [utils] Improve cookie files support 2020-05-05 04:21:25 +07:00
test_aes.py Fix W504 and disable W503 (closes #20863) 2019-05-11 03:57:40 +07:00
test_age_restriction.py [test_age_restriction] remove misbehaving test 2015-01-08 18:03:29 +01:00
test_all_urls.py [yahoo] restore support for cbs suffixed URLs 2019-10-31 07:38:53 +01:00
test_cache.py [test_cache] Add a dot in the file name 2014-09-04 04:51:52 +02:00
test_compat.py [test] Fix test_compat_etree_Element 2019-03-06 02:46:26 +07:00
test_download.py [test_download] Fix download tests for lazy extractors (closes #13554, closes #13757) 2018-01-21 18:15:11 +07:00
test_downloader_http.py [extractor/common] Ensure response handle is not prematurely closed before it can be read if it matches expected_status (resolves #17195, closes #17846, resolves #17447) 2018-11-03 01:18:20 +07:00
test_execution.py Update coding style after pycodestyle 2.1.0 2016-11-17 19:45:42 +08:00
test_http.py [extractor/common] Ensure response handle is not prematurely closed before it can be read if it matches expected_status (resolves #17195, closes #17846, resolves #17447) 2018-11-03 01:18:20 +07:00
test_iqiyi_sdk_interpreter.py Update coding style after pycodestyle 2.1.0 2016-11-17 19:45:42 +08:00
test_jsinterp.py Update coding style after pycodestyle 2.1.0 2016-11-17 19:45:42 +08:00
test_netrc.py Make sure netrc works for all extractors with login support 2015-03-03 12:59:17 +01:00
test_options.py [options] Typo 2017-07-23 16:24:18 +08:00
test_postprocessors.py [tests] Fix invalid escape sequences 2018-11-23 00:43:42 +07:00
test_socks.py [test/test_socks] Skip SOCKS tests 2016-05-14 18:48:36 +08:00
test_subtitles.py [test_subtitles] Remove obsolete test 2020-02-29 22:08:43 +07:00
test_swfinterp.py Fix W504 and disable W503 (closes #20863) 2019-05-11 03:57:40 +07:00
test_unicode_literals.py [test/unicode_literals] Don't look into the .git and .tox directories 2015-03-14 20:25:37 +01:00
test_update.py [update] fix (unexploitable) BB'06 vulnerability in rsa_verify 2016-01-21 20:12:17 +00:00
test_utils.py [utils] Don't attempt to coerce JS strings to numbers in js_to_json (#26851) 2020-10-18 00:10:41 +07:00
test_verbose_output.py Update coding style after pycodestyle 2.1.0 2016-11-17 19:45:42 +08:00
test_write_annotations.py Update coding style after pycodestyle 2.1.0 2016-11-17 19:45:42 +08:00
test_youtube_chapters.py [youtube] Extract chapters from JSON (closes #24819) 2020-06-06 04:22:10 +07:00
test_youtube_lists.py Fix some tests 2018-04-18 00:10:02 +07:00
test_youtube_signature.py [youtube] Improve player id extraction and add tests 2020-05-02 07:18:08 +07:00
testcert.pem Add a test for --no-check-certificate 2015-01-30 02:57:37 +01:00
versions.json [update] fix (unexploitable) BB'06 vulnerability in rsa_verify 2016-01-21 20:12:17 +00:00