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

POSTing binary data as bytes or bytearray instead of BytesIO breaks assumptions baked into replace_post_data_parameters #660

Open
fiendish opened this issue Oct 4, 2022 · 2 comments
Labels

Comments

@fiendish
Copy link

fiendish commented Oct 4, 2022

This sequence

vcrpy/vcr/filters.py

Lines 110 to 116 in f3f6608

splits = [p.partition(b"=") for p in request.body.split(b"&")]
new_splits = []
for k, sep, ov in splits:
if sep is None:
new_splits.append((k, sep, ov))
else:
rk = k.decode("utf-8")

assumes that anything that isn't a BytesIO or dict or with content-type json that is splittable by b"=" can be UTF-8 decoded. But any random unlucky binary data is likely to have a b"=" somewhere in it, and, if passed in as a raw byte array instead of a BytesIO, it then chokes that decode with 'utf-8' codec can't decode...blah blah blah if the user has defined filter_post_data_parameters for their recorder.

The BytesIO check in

if request.method == "POST" and not isinstance(request.body, BytesIO):
is insufficient for preventing exceptions from trying to decode binary data.

@samamorgan
Copy link

samamorgan commented Sep 20, 2023

I suspect this is due to a downstream change in the requests library. It didn't seem to happen with v2.28.1

Edit: I was wrong, tried downgrading and it made no difference.

@samamorgan
Copy link

samamorgan commented Oct 25, 2023

Here's a sample request body that is causing an error.

--7ac9dc7b70e1c10c8b48844f6dd76995
Content-Disposition: form-data; name="files"; filename="image.jpg"
Content-Type: image/jpeg

\xff\xd8\xff\xe1\x00\xe8Exif\x00\x00MM\x00*\x00\x00\x00\x08\x00\x06\x01\x12\x00\x03\x00\x00\x00\x01\x00\x01\x00\x00\x01\x1a\x00\x05\x00\x00\x00\x01\x00\x00\x00V\x01\x1b\x00\x05\x00\x00\x00\x01\x00\x00\x00^\x01(\x00\x03\x00\x00\x00\x01\x00\x02\x00\x00\x02\x13\x00\x03\x00\x00\x00\x01\x00\x01\x00\x00\x87i\x00\x04\x00\x00\x00\x01\x00\x00\x00f\x00\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x01\x00\x00\x00\x90\x00\x00\x00\x01\x00\x08\x90\x00\x00\x07\x00\x00\x00\x040221\x91\x01\x00\x07\x00\x00\x00\x04\x01\x02\x03\x00\x92\x86\x00\x07\x00\x00\x00\x12\x00\x00\x00\xcc\xa0\x00\x00\x07\x00\x00\x00\x040100\xa0\x01\x00\x03\x00\x00\x00\x01\x00\x01\x00\x00\xa0\x02\x00\x04\x00\x00\x00\x01\x00\x00\x00\x80\xa0\x03\x00\x04\x00\x00\x00\x01\x00\x00\x00\x80\xa4\x06\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00ASCII\x00\x00\x00Screenshot\x00\x00\xff\xe2\x02\x18ICC_PROFILE\x00\x01\x01\x00\x00\x02\x08appl\x04\x00\x00\x00mntrRGB XYZ \x07\xe7\x00\n\x00\x19\x00\x08\x00&\x00\x1eacspAPPL\x00\x00\x00\x00APPL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xd6\x00\x01\x00\x00\x00\x00\xd3-appl\xb7\xd7%\xfbQl\x18\xbe\xa9\x1f\x13\xd8Lj\x94\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ndesc\x00\x00\x00\xfc\x00\x00\x00.cprt\x00\x00\x01,\x00\x00\x00Pwtpt\x00\x00\x01|\x00\x00\x00\x14rXYZ\x00\x00\x01\x90\x00\x00\x00\x14gXYZ\x00\x00\x01\xa4\x00\x00\x00\x14bXYZ\x00\x00\x01\xb8\x00\x00\x00\x14rTRC\x00\x00\x01\xcc\x00\x00\x00\x10chad\x00\x00\x01\xdc\x00\x00\x00,bTRC\x00\x00\x01\xcc\x00\x00\x00\x10gTRC\x00\x00\x01\xcc\x00\x00\x00\x10mluc\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0cenUS\x00\x00\x00\x12\x00\x00\x00\x1c\x00L\x00G\x00 \x00H\x00D\x00R\x00 \x004\x00K\x00\x00mluc\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0cenUS\x00\x00\x004\x00\x00\x00\x1c\x00C\x00o\x00p\x00y\x00r\x00i\x00g\x00h\x00t\x00 \x00A\x00p\x00p\x00l\x00e\x00 \x00I\x00n\x00c\x00.\x00,\x00 \x002\x000\x002\x003XYZ \x00\x00\x00\x00\x00\x00\xf6\xd6\x00\x01\x00\x00\x00\x00\xd3-XYZ \x00\x00\x00\x00\x00\x00y\xd7\x00\x008Q\x00\x00\x00\\XYZ \x00\x00\x00\x00\x00\x00T\xd9\x00\x00\xbaP\x00\x00\x0b\x9bXYZ \x00\x00\x00\x00\x00\x00(&\x00\x00\r`\x00\x00\xc75para\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf6\x04sf32\x00\x00\x00\x00\x00\x01\x0cr\x00\x00\x05\xf8\xff\xff\xf3\x1d\x00\x00\x07\xba\x00\x00\xfdr\xff\xff\xfb\x9d\xff\xff\xfd\xa4\x00\x00\x03\xd9\x00\x00\xc0q\xff\xdb\x00\x84\x00\x01\x01\x01\x01\x01\x01\x02\x01\x01\x02\x03\x02\x02\x02\x03\x04\x03\x03\x03\x03\x04\x06\x04\x04\x04\x04\x04\x06\x07\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x08\x08\x08\x08\x08\x08\t\t\t\t\t\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x01\x02\x02\x02\x03\x03\x03\x05\x03\x03\x05\x0b\x08\x06\x08\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\xff\xdd\x00\x04\x00\x08\xff\xc0\x00\x11\x08\x00\x80\x00\x80\x03\x01"\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x01\xa2\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01}\x01\x02\x03\x00\x04\x11\x05\x12!1A\x06\x13Qa\x07"q\x142\x81\x91\xa1\x08#B\xb1\xc1\x15R\xd1\xf0$3br\x82\t\n\x16\x17\x18\x19\x1a%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\x01\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x11\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04\x00\x01\x02w\x00\x01\x02\x03\x11\x04\x05!1\x06\x12AQ\x07aq\x13"2\x81\x08\x14B\x91\xa1\xb1\xc1\t#3R\xf0\x15br\xd1\n\x16$4\xe1%\xf1\x17\x18\x19\x1a&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x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xe6\x14\xa1I\xe8(\xd0|\xaf\xb9\xe9\xbf\xf0\x8f\xf8F\xdb\x9b\x8b\x9c\xff\x00\xc0\xb1H.\xfc\x0f\xa7\xff\x00\xaa\x8f\xcd#\xa7\x19\xaf<\x8e\xc6\xf6^"\x85\xdb\xe8\xa6\xb5m\xfc/\xae\xdc\xfd\xcbr\xa3\xfd\xac/\xf3\xa0\x9eU\xd5\x9d<\xfe:\x8e!\xb3M\xb6\t\xee\x7f\xfa\xd5\xcf\\\xf8\xb7\\\xb9?\xebv\x0fD\xe2\xb7-|\x03s\x8d\xf7\xf3\xa4c\xfd\x9e\x7f\xc2\xae\x8d\'\xc1Zo\x17s\xf9\xa4{\xe7\xff\x00A\xa3P\xf7V\xc7\xff\xd9
--7ac9dc7b70e1c10c8b48844f6dd76995--

The request being made is below. Debugger paused at: https://github.com/kevin1024/vcrpy/blob/master/vcr/stubs/__init__.py#L257

>>> __file__
'{{ ENVIRONMENT PATH REDACTED }}/lib/python3.10/site-packages/vcr/stubs/__init__.py'
>>> print(json.dumps(self._vcr_request._to_dict(), default=str, indent=2))
{
  "method": "POST",
  "uri": "https://{{ HOST REDACTED }}{{ PATH REDACTED }}?page=0",
  "body": "b'{{ SEE ABOVE }}'",
  "headers": {
        "User-Agent": [
          "{{ REDACTED }}"
    ],
    "Accept-Encoding": [
          "gzip, deflate, br"
    ],
    "Accept": [
          "*/*"
    ],
    "Connection": [
          "keep-alive"
    ],
    "Content-Length": [
          "4836"
    ],
    "Content-Type": [
          "multipart/form-data; boundary=7ac9dc7b70e1c10c8b48844f6dd76995"
    ],
    "Authorization": [
          "Bearer {{ REDACTED }}"
    ]
  }
}

I'm also on the latest version:

sammorgan$ python -c "import vcr; print(vcr.__version__)"
5.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants