Skip to content

Blob override is not good enough and clashes with whatwg-fetch npm package #87

@weizman

Description

@weizman
  • @Vadman97 commented support same-origin iframe network/console recording highlight/highlight#3934 (comment) where he shows multiple issues with Snow integration.
  • I was able to reproduce specifically the exception with the [object Blob] thing on LinkedIn (which I believe is the same issue).
    • This happens because LinkedIn uses whatwg-fetch which tries to tell what is the type of a message body parameter.
    • To determine whether it is a Blob, it runs support.blob && Blob.prototype.isPrototypeOf(body) where true indicates it is a Blob.
    • Since our wrap makes Blob inherit from Function instead of Blob, this fails and we end up on a different conclusion which results in a shitstorm basically.
  • Moreover, Current implementation is not secure enough.
    • One can get a hold on a Blob instance that is not created via new Blob() and thus bypassing Snow.
    • For example, XHR when configured right responds with a native Blob object which obviously isn't affected by our monkey patching.
  • These issues require attention, especially making sure web apps don't break when running on Snow

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions