Your message dated Sun, 11 Dec 2016 10:34:10 +0000
with message-id <e1cg1sm-0001gy...@fasolo.debian.org>
and subject line Bug#847180: fixed in wikipediafs 0.4-7
has caused the Debian Bug report #847180,
regarding wikipediafs: broken with mediawiki 1.19.24
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
847180: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847180
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: wikipediafs
Version: 0.4-6
Severity: serious
Justification: makes the package completly unusable
Hi,
in August 2016 I tried to use wikipediafs with wiki.hamburg.ccc.de and
eventually succeeded, after applying the attached patches.
wiki.hamburg.ccc.de runs mediawiki 1.19.24
For this I had to take svn://svn.code.sf.net/p/wikipediafs/code@75 and
modify it like in the attached patch…
I have no idea how it performs against mediawiki 1.27.1-2 which is the
current version in stretch but I strongly assume it's still broken.
--
cheers,
Holger
diff -Nru wikipediafs-0.4/debian/changelog wikipediafs-0.4/debian/changelog
--- wikipediafs-0.4/debian/changelog 2014-07-14 11:35:51.000000000 +0200
+++ wikipediafs-0.4/debian/changelog 2016-08-05 16:06:40.000000000 +0200
@@ -1,3 +1,12 @@
+wikipediafs (0.4-6.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Take svn upstream commit #75 from mercury: "Make logins less touchy to
+ cookie changes."
+ * Modify that patch…
+
+ -- Holger Levsen <hol...@debian.org> Fri, 05 Aug 2016 15:32:21 +0200
+
wikipediafs (0.4-6) unstable; urgency=medium
* Add Vcs-* information
diff -Nru wikipediafs-0.4/debian/patches/0001-Make-logins-less-touchy-to-cookie-changes.patch wikipediafs-0.4/debian/patches/0001-Make-logins-less-touchy-to-cookie-changes.patch
--- wikipediafs-0.4/debian/patches/0001-Make-logins-less-touchy-to-cookie-changes.patch 1970-01-01 01:00:00.000000000 +0100
+++ wikipediafs-0.4/debian/patches/0001-Make-logins-less-touchy-to-cookie-changes.patch 2016-08-05 16:06:23.000000000 +0200
@@ -0,0 +1,92 @@
+From a30a97bd49a440907c9c28bb8be66a08d013c02f Mon Sep 17 00:00:00 2001
+From: mercury <mercury@59acd704-e115-0410-a914-e735a229ed7c>
+Date: Fri, 10 Jul 2015 02:45:15 +0000
+Subject: [PATCH] Make logins less touchy to cookie changes.
+
+First off, the cookie list internal to getCookieString is now a dict instead of a list, this has slightly worse code for formatting, but rather better code for checking to see if we have logged in successfully.
+
+Second, the login declined case no longer tries to format more variables that are provided, allowing us to go down the path correctly.
+
+This gets wikipediafs working again for me against mediawiki 1.19.14+dfsg-1.
+
+
+
+git-svn-id: svn://svn.code.sf.net/p/wikipediafs/code@75 59acd704-e115-0410-a914-e735a229ed7c
+---
+ trunk/src/wikipediafs/user.py | 34 +++++++++++++++++++---------------
+ 1 file changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/src/wikipediafs/user.py b/src/wikipediafs/user.py
+index 9e3f48e..c28eb2d 100644
+--- a/src/wikipediafs/user.py
++++ b/src/wikipediafs/user.py
+@@ -66,7 +66,7 @@ class User:
+
+ printlog(self.logger, "debug", "Logging in with username %s." % self.username)
+ self.logintoken = None
+- cookie_list = []
++ cookies = {}
+ conn = ExtendedHTTPConnection(self.host, self.port, self.https)
+
+ if self.httpauth_username and self.httpauth_password:
+@@ -101,10 +101,11 @@ class User:
+ # If we have a login token, then we also need to send the cookie from the initial connection.
+ # If we don't, then doing so breaks the login.
+
+- token_session = re.search('(.*?);', response.getheader("Set-Cookie")).group(1)
++ token_matches = re.search('((.*?)=(.*?));', response.getheader("Set-Cookie"));
++ token_session = token_matches.group(1)
+ if self.logintoken:
+ headers["Cookie"] = token_session
+- cookie_list.append(token_session)
++ cookies[token_matches.group(2)] = token_matches.group(3)
+
+ printlog(self.logger, "debug", "Headers:")
+ printlog(self.logger, "debug", headers)
+@@ -125,28 +126,31 @@ class User:
+ response = conn.getresponse()
+ printlog(self.logger, "debug", "URL: %s, response status: %d, text: %s" % (self.login_page, response.status, response.read()))
+
+- in_cookie = re.compile(': (.*?);')
++ in_cookie = re.compile(': ((.*?)=(.*?));')
+
+ for cookie_value in response.msg.getallmatchingheaders("set-cookie"):
++ printlog(self.logger, "debug", "cookie: %s" % cookie_value)
+ it_matches = in_cookie.search(cookie_value)
+
+ if it_matches:
+- cookie_list.append(it_matches.group(1))
++ cookies[it_matches.group(2)] = it_matches.group(3)
+
+ conn.close()
+
+ printlog(self.logger, "debug", "cookie_list:")
+- printlog(self.logger, "debug", cookie_list)
+-
+- if len(cookie_list) == 4:
+- cookie_list.pop()
+- printlog(self.logger, "info",
+- "Logged in successfully with username %s" % self.username)
+- #self.logger.info("; ".join(cookie_list))
+- return "; ".join(cookie_list)
++ printlog(self.logger, "debug", cookies)
++
++ if cookies.has_key('wikiUserName'):
++ cookie_str = ""
++ for k, v in cookies.iteritems():
++ if cookie_str == "":
++ cookie_str = "%s=%s;" % (k, v)
++ else:
++ cookie_str += " %s=%s;" % (k, v)
++ printlog(self.logger, "info", "Logged in successfully with username %s" % self.username)
++ return cookie_str
+ else:
+- printlog(self.logger, "warning",
+- "Could not log in with username %s: %s" % self.username)
++ printlog(self.logger, "warning", "Could not log in with username %s" % self.username)
+ return None
+
+
+--
+2.1.4
+
diff -Nru wikipediafs-0.4/debian/patches/series wikipediafs-0.4/debian/patches/series
--- wikipediafs-0.4/debian/patches/series 2014-07-14 11:35:51.000000000 +0200
+++ wikipediafs-0.4/debian/patches/series 2016-08-05 15:37:58.000000000 +0200
@@ -1,3 +1,4 @@
#10_no_shebang_lines.patch
20_585369.patch
30-spelling-in-manpage.patch
+0001-Make-logins-less-touchy-to-cookie-changes.patch
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Source: wikipediafs
Source-Version: 0.4-7
We believe that the bug you reported is fixed in the latest version of
wikipediafs, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 847...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sebastien Delafond <s...@debian.org> (supplier of updated wikipediafs package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 11 Dec 2016 11:05:28 +0100
Source: wikipediafs
Binary: wikipediafs
Architecture: source all
Version: 0.4-7
Distribution: unstable
Urgency: medium
Maintainer: Sebastien Delafond <s...@debian.org>
Changed-By: Sebastien Delafond <s...@debian.org>
Description:
wikipediafs - View and edit Wikipedia articles as if they were real files
Closes: 847180 847181
Changes:
wikipediafs (0.4-7) unstable; urgency=medium
.
* Patch contributed by Holger Levsen <hol...@layer-acht.org> to fix the
custom cookie names that can be used by some mediwawiki installs
(Closes: #847180, #847181)
Checksums-Sha1:
21265dc162fa4b8408e8a367cfe40c1497e7b2f2 1554 wikipediafs_0.4-7.dsc
9aa4c6799e5122c59346cee71e5c3147455b4e93 4788 wikipediafs_0.4-7.debian.tar.xz
f02b5c755cbe9654537c69b500524c0325dba80d 19304 wikipediafs_0.4-7_all.deb
36030a3e94a0e4a1debdbcd1f0980c3327072944 5059 wikipediafs_0.4-7_amd64.buildinfo
Checksums-Sha256:
97fe3fe0f5714cd45019bb3b1088c1ec906d121a0eb9b140af6d59743ebe446d 1554
wikipediafs_0.4-7.dsc
735ed955e35b40e2c483703456aeb82aca508790a807f8515bd95e33e1cd0a5c 4788
wikipediafs_0.4-7.debian.tar.xz
22fc41da600e06dfed5f85754917faa426a1f017dde4938fd66a2424658920aa 19304
wikipediafs_0.4-7_all.deb
6c8ffd86778ff9981c41292bf153a5c479b603d4db53841ffd83203f0e926cfb 5059
wikipediafs_0.4-7_amd64.buildinfo
Files:
84b08980953c7230f6b451a189a2e014 1554 utils extra wikipediafs_0.4-7.dsc
c4894ff4259bd438d856f4283df30964 4788 utils extra
wikipediafs_0.4-7.debian.tar.xz
cc686276a6ddc5d4b0baeb692a1448c5 19304 utils extra wikipediafs_0.4-7_all.deb
f7940d744d35b00bad15d3defbf55512 5059 utils extra
wikipediafs_0.4-7_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQEcBAEBCgAGBQJYTSbtAAoJEBC+iYPz1Z1kxQ0IAJG2yiD9bw9vs7kXISi5S/9J
TkE05b8lFXDvU9uSqCGpiE+oAMrZdWn7BJlELgLRtyMxohyvy36NtC3OlmD8Jc8J
2YaYtKbv9WtWgyBfiiTTLk3pydLu4+9wzjXblC19SPqLu/iEX68IGGobL5eocPey
qRuGsKBA/Pnex8bbvrtquixAV+bqDmL19ois+luoMWXHxv0PY6rjYSy+XF6OB3rr
dr+EwVjw7FLM1N5X/c1cLKknEM5mnTVhllxgq8n/hwXnK65P5A9EcomjOolt5m7c
xAQcveCKHnh11Qddjq711IRyKKtgSGkBMAGhkWBqvGEJjpVtRGczFSinVsdOoMA=
=12ex
-----END PGP SIGNATURE-----
--- End Message ---