{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Not a bug",
    "ClosedDate": "2009-11-09T00:58:37.177-08:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "I am experiencing the Ionic.Utils.Zip.BadPasswordException even though the passwords are correct and do match.  I can't seem to duplicate the problem in my testing environment.  I have a mixture of XP and Vista machines, but they all work fine.  First, let me explain how the program works...\n \nI have a webservice sitting on a Windows 2008 x64 Web server.  The client program takes a data packet, zips it up with a password, then transmits it to the webservice.  The webservice then tries to unzip the files with the same password.  The problem is that the webservice responds with the error Ionic.Utils.Zip.BadPasswordException.  It isn't easily reproduced.  All of my test machines are x86 Vista or XP, and they all work.  The customer has 3 XP machines.  One worked fine with my software and continues to work fine.  The second one didn't work, it got that error message.  We logged onto that computer as a different user and it worked fine.  And then, out of the blue, 4 weeks later it workd on that computer under the user's profile that hadn't originally worked.  Now, we have a third machine that gets the same error.  It doesn't matter what profile we run the software under, we still get the error.  I am using version 1.8.4.24 of the DotNetZipLib.\n \nHere is the error message. I typed it manually, because the customer just sent me a screenshot.  Hopefully I didn't have any typos.  Any ideas on what this problem could be?\n \nSystem.ServiceModel.FaultException `1[System.ServiceModel.ExceptionDetail]: The password did not match. (Fault Detail is equal to an ExceptionDetail, likely created by IncludeExceptionDetailInFailts=true, whose value is: Ionic.Utils.Zip.BadPasswordException: The password did not match.\nat Ionic.Utils.Zip.ZipEntry.SetupCipher(String Password)\nat Ionic.Utils.Zip.ZipEntry.InternalExtract(String basedir, Stream outstream, String Password)\nat Ionic.Utils.Zip.ZipEntry.ExtractWithPassword(Stream s, String Password)\n \nAny help would be greatly appreciated.",
    "LastUpdatedDate": "2013-05-16T05:32:01.933-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-10-23T08:26:25.75-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "BadPasswordException - But Passwords are Correct and Do Match",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 9042
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "You asked, any idea what the problem could be.  The only possibility is that the password does not match. This can be caused by, either , you use the wrong password, or, the data to be decrypted is not the same as the data that emerged from encryption.  \r\nYou're telling me that the password is the same, therefore, the remaining possibility is that the data  you are trying to decrypt is not the same as the data that was generated from decryption.  There really is no other possibility.  \r\n\r\nIf you want to troubleshoot, you might conmpute a hash on the zip data, before transmission and after receipt, and compare them.  You may find that the data has been modified or corrupted somehow, in transit.  \r\n\r\nThe \"bad password\" exception is detected when reading the first 12 bytes of the encrypted datastream.  So if there is any corruption or confusion, it is at the beginning of the data stream.  \r\n",
      "PostedDate": "2009-10-23T20:06:24.68-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Typo:   \r\n\r\n> not the same as the data that was generated from decryption ...\r\n \r\nnot the same as the data that was generated from ENcryption. \r\n",
      "PostedDate": "2009-10-23T20:07:38.997-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I'm doing a hash comparison with the data on both ends now.  I'll let you know what the outcome is. Thanks for the tip.",
      "PostedDate": "2009-10-27T09:41:42.927-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Oh, Jon, one more thing.  Just looking at the exception, It appears you're using an old version of the library.  Sounds like v1.6. You need to update to v1.9.  ",
      "PostedDate": "2009-11-08T04:39:05.38-08:00",
      "Id": -2147483648
    },
    {
      "Message": "ps: the reason I Say it looks like an old ersion of the library - your stacktrace mentions classes in the Ionic.Utils.Zip namespace.  That namespace was replaced in v1.7.   I know you said you are using 1.8.4.26, but that stacktrace is from 1.6 or earlier. \r\n",
      "PostedDate": "2009-11-08T07:11:17.083-08:00",
      "Id": -2147483648
    },
    {
      "Message": "Cheeso, I finally figured out this problem earlier this week.  The error was correct; the passwords did not match.  I was using a date/time value as my password.  I was serializing the data on the client side, then deserializing the data on the server side.  I use a combination of the date/time the request is processed and some other values to create the password.  In theory, the password (date/time) is serialized, passed to the server, and deserialized.  Then the date/time is used as part of the password to unzip the data.  What I found is that for some reason, when you serialize a date, t hen deserialize it on the other end, the milliseconds portion of the date can be off by up to 3 milliseconds.  This of course means the password doesn't match!\r\n\r\nSo, long story short; there is a problem with serializing a date/time value on one side, and then deserializing that same date/time on the remote side.  They don't always match.  I couldn't figure out why it would differ with some systems and not others, so I decided to control the passwords at both ends in a different way.  So my problem is fixed at this point.  No bug in the Ionic software!  Thanks for your info. It helped lead me in the right direction.",
      "PostedDate": "2009-11-08T08:02:21.217-08:00",
      "Id": -2147483648
    },
    {
      "Message": "excellent ! glad you were able to figure it out. \r\nThanks for the update.\r\n",
      "PostedDate": "2009-11-09T00:58:19.573-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-11-09T00:58:37.177-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:52.583-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:01.933-07:00",
      "Id": -2147483648
    }
  ]
}