d4bb269 Bugfix: Prevent page scripts from deleting wrappings

1 file Authored by peter.hornak 3 years ago, Committed by Libor Polčák 3 years ago,
    Bugfix: Prevent page scripts from deleting wrappings
    
    Previously, page script can get to the original code:
    
        console.log(Date.now());
        delete Date.now;
        console.log(Date.now());
    
    Note that this commit increases the fingerprintability of the browser:
    
        Date.now = () => 1;
        console.log(Date.now());
    
    Without our wrapping, Date.now() returns 1 while with this commit, the
    code returns the wrapped value.
    
    See also:
    Michael Schwarz, Florian Lackner, and Daniel Gruss. 2019.
    JavaScript Template Attacks: Automatically Inferring Host Information
    for Targeted Exploits. In Network and Distributed Systems Security
      (NDSS) Symposium.
    
        
file modified
+1 -0