[Pkg-cli-apps-commits] [SCM] keepass2 branch, master, updated. debian/2.16+dfsg-1-2-g34b19d3

Julian Taylor jtaylor.debian at googlemail.com
Sat Oct 8 11:00:11 UTC 2011


The following commit has been merged in the master branch:
commit 34b19d3ff406ceeecc663e1be8da5427b6d7928d
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date:   Sat Oct 8 12:42:59 2011 +0200

    add patch: explicitly-PUT-for-webdav-writes.patch
    
    * add patch: explicitly-PUT-for-webdav-writes.patch
      - fixes data loss when saving database to webdav with transactions

diff --git a/debian/changelog b/debian/changelog
index 90748d2..df5bcd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-keepass2 (2.16+dfsg-2) UNRELEASED; urgency=low
+keepass2 (2.16+dfsg-2) UNRELEASED; urgency=medium
 
   * debian/copyright: fix dep-5 syntax errors and wrong license tags
+  * add patch: explicitly-PUT-for-webdav-writes.patch
+    - fixes data loss when saving database to webdav with transactions
 
- -- Julian Taylor <jtaylor.debian at googlemail.com>  Sun, 18 Sep 2011 23:14:54 +0200
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Sat, 08 Oct 2011 12:41:09 +0200
 
 keepass2 (2.16+dfsg-1) unstable; urgency=low
 
diff --git a/debian/patches/explicitly-PUT-for-webdav-writes.patch b/debian/patches/explicitly-PUT-for-webdav-writes.patch
new file mode 100644
index 0000000..ae0901c
--- /dev/null
+++ b/debian/patches/explicitly-PUT-for-webdav-writes.patch
@@ -0,0 +1,37 @@
+From: Julian Taylor <jtaylor.debian at googlemail.com>
+Date: Thu, 6 Oct 2011 21:59:57 +0200
+Subject: explicitly PUT for webdav writes
+
+mono does not set HttpRequets.Method to POST for writes so the changing
+to from POST to PUT is not done ConfigureWebRequest leading to failed
+saving and deletion of the database on the webdav storage when
+transactions are enabled
+Applied-Upstream: 2.17
+Bug: https://bugzilla.novell.com/show_bug.cgi?id=722581
+---
+ KeePassLib/Serialization/IOConnection.cs |   11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/KeePassLib/Serialization/IOConnection.cs b/KeePassLib/Serialization/IOConnection.cs
+index 5a93b76..a9b9cc9 100644
+--- a/KeePassLib/Serialization/IOConnection.cs
++++ b/KeePassLib/Serialization/IOConnection.cs
+@@ -243,7 +243,16 @@ namespace KeePassLib.Serialization
+ 
+ 			if(ioc.IsLocalFile()) return OpenWriteLocal(ioc);
+ 
+-			return CreateWebClient(ioc).OpenWrite(new Uri(ioc.Path));
++			Uri uri = new Uri(ioc.Path);
++
++			// Mono does not set HttpWebRequest.Method to POST for writes,
++			// so one needs to set the method to PUT explicitly
++			if(NativeLib.IsUnix() && (uri.Scheme.Equals(Uri.UriSchemeHttp,
++				StrUtil.CaseIgnoreCmp) || uri.Scheme.Equals(Uri.UriSchemeHttps,
++				StrUtil.CaseIgnoreCmp)))
++				return CreateWebClient(ioc).OpenWrite(uri, WebRequestMethods.Http.Put);
++
++			return CreateWebClient(ioc).OpenWrite(uri);
+ 		}
+ #else
+ 		public static Stream OpenWrite(IOConnectionInfo ioc)
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index d0c70b5..86f1fc2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ fix-XSL-search-path.patch
 remove-ToolsVersion-3.5.patch
 prefer-4.0-framework-if-available.patch
 enable-local-help.patch
+explicitly-PUT-for-webdav-writes.patch

-- 
keepass2



More information about the Pkg-cli-apps-commits mailing list