1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00
youtube-dl/youtube_dl
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
..
downloader [downloader/http] Properly handle missing message in SSLError (closes #26646) 2020-09-22 07:01:59 +07:00
extractor [ustream] Add support for video.ibm.com (#26894) 2020-10-17 23:14:46 +07:00
postprocessor [postprocessor/embedthumbnail] Fix issues (closes #25717) 2020-09-14 03:28:31 +07:00
__init__.py Output batch filename when it could not be read (#21915) 2019-08-01 03:54:39 +07:00
__main__.py
aes.py Switch codebase to use compat_b64decode 2018-01-23 22:23:12 +07:00
cache.py Use expand_path where appropriate (closes #12556) 2017-03-26 02:31:16 +07:00
compat.py [compat] Introduce compat_cookiejar_Cookie 2020-05-05 05:54:10 +07:00
jsinterp.py [jsinterp] Fix typo and cleanup regexes (closes #13134) 2017-05-18 22:57:38 +07:00
options.py [options] Clarify doc on --exec command (closes #19087) (#24883) 2020-04-24 02:31:38 +07:00
socks.py [socks] Report errors elegantly when credentails are required but missing 2017-04-22 21:48:41 +08:00
swfinterp.py
update.py [update] Fix updating via symlinks (closes #23991) 2020-02-08 19:46:58 +07:00
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
version.py release 2020.09.20 2020-09-20 12:30:45 +07:00
YoutubeDL.py [YoutubeDL] Force redirect URL to unicode on python 2 2020-02-29 19:08:44 +07:00