Results 1 to 7 of 7

Thread: Major issue: Old zip being corrupted.

  1. #1

    Thread Starter
    Join Date
    Jul 2010

    Major issue: Old zip being corrupted.

    This happened to one of mine and I thought, ok, *maybe* it was me, and somewhere I had a different copy that I had uploaded compared to the one in my project folders.

    But now the exact same thing has happened to this .zip The trick uploaded:

    I've confirmed it's not a browser issue by using different browsers on different devices.

    Opening up the files, it appears some HTML got inserted ahead of the content. Some google "tag manager" thing was likely improperly set to modify .zip.

    <!-- BEGIN GTM -->
    console.log('TA GTM Tag');
    var gtmID="GTM-TJD5FTH";(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=''+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer',gtmID);
    function docReady(fn) {
        // see if DOM is already available
        if (document.readyState === "complete" || document.readyState === "interactive") {
            // call on next available tick
            setTimeout(fn, 1);
        } else {
            document.addEventListener("DOMContentLoaded", fn);
    docReady(function() {
    var firstElement = document.body.firstChild;
            var urlElement = "";
            var gtmElement = document.createElement('noscript');
    	var gtmIframe = document.createElement('iframe');
            gtmIframe.src = urlElement + gtmID;
   = '0';
   = '0'; = 'display:none;visibility:hidden';
            firstElement.parentNode.insertBefore(gtmElement, firstElement);
    <!--END GTM-->
    Going through things, this issue is widespread.
    Last edited by fafalone; Feb 18th, 2024 at 04:13 AM.

  2. #2

    Thread Starter
    Join Date
    Jul 2010

    Re: Major issue: Old zip being corrupted.

    This might be even worse than initially thought.

    It's not just prepended... the server is truncating at the original file size. So the last couple KB are cut off, meaning there's no way to fix these files on our end.

    I *really* hope the originals weren't modified or that there's backups. Because this is every zip on the site as far as I can see.

  3. #3

  4. #4
    New Member
    Join Date
    Aug 2022

    Re: Major issue: Old zip being corrupted.

    Yes, also when downloading ancient stuff, the same corruption. It's like some kind of mal database injection.

    Don't know if this is relevant, but it shows that cybercrooks have a handle on GTM scripts
    Hackers Planting Credit Card Skimmers Inside Google Tag Manager Scripts

    I always keep UMatrix set to block GTM

    Cloudflare analysis of:

    downloads this:

    <!DOCTYPE html><html lang="en"><head>
    <meta charset="utf-8">
    <img src="//" style="display:none;" border="0" height="1" width="1" alt="Quantcast">
    Last edited by philo; Feb 18th, 2024 at 02:45 PM.

  5. #5
    New Member
    Join Date
    Oct 2023

    Re: Major issue: Old zip being corrupted.

    Based on what I've had, the end of the attachments are squeezed out by some XML(<!--END GTM--> and the previous content).

  6. #6
    Join Date
    Aug 2010

    Re: Major issue: Old zip being corrupted.

    I've been able to confirm (for attachments mid-August 2012 and earlier at least*) that the attachment files are thankfully not corrupted on the file system - the data is being mangled in transit by the web server. You can get any pre-August 14-ish attachment as follows:

    1. Make a note of the numeric portion of the user ID of the user that posted the attachment. For example, hovering over my user name shows this URL: so the number we're interested in is 128698.

    2. Make a note of the pre-August 2012 attachment ID. For example, in this post of mine from 2011:, hovering over the attachment link in the first post shows this URL: so the number we're interested in is 84913

    3. Built the start of the URL as follows:

    4. The split the user ID into individual digits a add a forward slash after each digit:

    5. Append the attachment ID, followed by an extension of ".attach":

    6. Change the extension of the downloaded file to ".zip" and you should now be able to open the ZIP archive without error.

    * Thanks to EduardoVB for pinning down the date where the rules change for determining the attachment URL. Unfortunately we haven't found the new path algo yet.
    Last edited by jpbro; Feb 21st, 2024 at 07:26 AM.

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013

    Re: Major issue: Old zip being corrupted.

    Thanks for sharing guys!

    I managed to download the ZIP file from this codebank submission by dilettante:
    Using this url:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width