editmoin always responds "error: body information not found"

Bug #689328 reported by Paul Beardsell
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
editmoin
Fix Released
Undecided
Unassigned
editmoin (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Tested with Ubuntu Lucid and Maverick. Both
editmoin/lucid uptodate 1.10.1-3
editmoin/maverick uptodate 1.15-1
do not work.

The MoinMoin wiki is running
python-moinmoin/lucid-security uptodate 1.9.2-2ubuntu3.1
and the ACLs does not require any authentication to read but which does require the user to be "Known" for editing.

Editing works in the browser.

I have setup ~/.moin_ids to read
http://psb.multiwiki.com/MyWiki/ xxxxxxx
where xxxxxxx is the value of the MOIN_SESSION_80_ROOT_MyWiki cookie.
Also I have tried placing my login id in place of xxxxxxx as advised in the out-of-date editmoin man page.
I have also tried using .netrc to supply login credentials but that has not worked.

Always the response from the wiki is
error: body information not found

But if I remove the requirement to be logged in from the MoinMoin ACL then editmoin works.

I suggest editmoin is an old version which does not work with later versions of MoinMoin. Therefore either
(1) flag the dpkg dependencies of editmoin to only work with old releases of MoinMoin or
(2) release a newer version of editmoin

In any event, please fix the error message to plainly say what the problem is. Thanks

Revision history for this message
Ray Nichols (ray-rdnichols) wrote :

Using: editmoin/maverick 1.15-1

There is an indication on http://niemeyer.net/editmoin, in the News section for "2010-06-19 - Released editmoin 1.15", that it is actually file ~/.moin_users that is used for username configuration rather than ~/.moin_ids. The documentation for "Setting your username" does, however, refer to ~/.moin_ids. In using ~/.moin_users I do get asked for a password. If I provide the wrong one I get a "KeyError: 'set-cookie'" message.

If I provide the right password I still, unfortunately, get:
error: body information not found

Revision history for this message
Ray Nichols (ray-rdnichols) wrote :

Just for the record, downloading editmoin 1.16 works fine with a moinmoin repository at version 1.9.3.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This problem should be filed against Ubuntu apparently, since editmoin itself reportedly works with the latest version.

Changed in editmoin:
status: New → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

I couldn't use editmoin after some server side upgrades, despite using editmoin 1.16; I passed a patch to Gustavo which fixes it for me, apparently editmoin 1.9.3 (probably >= 1.9) uses different cookie names (and also different ones for http and https).

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :
Changed in editmoin (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

In addition to Loic's patch to get editmoin to work with wiki.ubuntu.com I had to add the following:

        if moinurl.startswith("https://wiki.ubuntu.com"):
            urlopener.addheader("Cookie",
                "MOIN_SESSION_80_ROOT=%s" % cookievalue)

That seems rather terrible but I can use editmoin again!

Revision history for this message
Brian Murray (brian-murray) wrote :

This bug was fixed in the package editmoin - 1.17-1

---------------
editmoin (1.17-1) unstable; urgency=low

  * New upstream release:
    - Use sensible-editor instead of vi to pick up the system level editor
      preference.
    - Add support for URLs that include query parameters.
  * Switch to 3.0 source package format.
  * Move inline change to editmoin.1 to 01_man_ids_from_firefox.patch. Also
    update it to catch cookies like "MOIN_SESSION_443_ROOT".
  * Move moin-plugin.vim into debian/, to work better for 3.0 source.
  * debian/control: Bump Standards-Version to 3.9.2.
  * Add 02_alternative_cookie_names.patch: Current moin versions use
    MOIN_SESSION_80_ROOT or MOIN_SESSION_443_ROOT cookie names. Try these
    before the standard MOIN_SESSION cookie. Thanks Andy Whitcroft for the
    patch! (LP: #801284)
  * debian/editmoin.install, debian/rules: Simplify installation of vim
    plugin.
  * Add bzr-builddeb configuration (merge mode).
 -- Martin Pitt <email address hidden> Wed, 06 Jul 2011 07:04:53 +0200

Changed in editmoin (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Jared Greenwald (jetsaredim) wrote :

I'm still seeing this issue when connecting to a 1.5.3 moin wiki on 11.10 with the 1.17-1 version of editmoin.

Revision history for this message
Jared Greenwald (jetsaredim) wrote :

Here's the stack and a bit of the trace...

$ editmoin http://<personal_page_url>
Password for <my_moin_id>:
Traceback (most recent call last):
  File "/usr/bin/editmoin", line 503, in <module>
    main()
  File "/usr/bin/editmoin", line 497, in main
    edit(argv[0], template)
  File "/usr/bin/editmoin", line 459, in edit
    cookiename, cookievalue = get_session_cookie(user, url)
  File "/usr/bin/editmoin", line 442, in get_session_cookie
    cookie.load(result.info()["set-cookie"])
  File "/usr/lib/python2.7/rfc822.py", line 388, in __getitem__
    return self.dict[name.lower()]
KeyError: 'set-cookie'

Ran pdb to see what this was all about...

$ /usr/lib/python2.7/pdb.py /usr/bin/editmoin http://<personal_page_url>
> /usr/bin/editmoin(19)<module>()
-> """
(Pdb) b 442
Breakpoint 1 at /usr/bin/editmoin:442
(Pdb) r
Password for <my_moin_id>:
> /usr/bin/editmoin(442)get_session_cookie()
-> cookie.load(result.info()["set-cookie"])
(Pdb) print result.info()
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Date: Thu, 15 Sep 2011 17:50:39 GMT
Expires: Wed, 15 Sep 2010 17:50:40 GMT
Keep-Alive: timeout=15, max=100
Pragma: no-cache
Proxy-Connection: close
Server: Apache/2.2.3 (Oracle) DAV/2 SVN/1.4.4-dev PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 mod_perl/2.0.4 Perl/v5.8.8
Vary: Cookie,User-Agent,Accept-Language

Not sure where set-cookie is coming from...?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.