Skip Menu |

This queue is for tickets about the CMS-MediaWiki CPAN distribution.

Report information
The Basics
Id: 29038
Status: resolved
Worked: 20 min
Priority: 0/
Queue: CMS-MediaWiki

People
Owner: Nobody in particular
Requestors: oeuftete [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: submit URLs are using entity (&) instead of actual ampersand (in 0.8012)
Date: Tue, 28 Aug 2007 15:52:55 -0300
To: bug-CMS-MediaWiki [...] rt.cpan.org
From: "Ken Crowell" <oeuftete [...] gmail.com>
I have to apply this patch to my CMS::MediaWiki installation to make it work. I believe the original URL would be right as an href in an HTML document, but not as an argument to LWP::UserAgent. --- MediaWiki.pm 2007-08-28 15:00:53.801468232 -0300 +++ MediaWiki.pm.old 2007-08-28 15:00:11.940832016 -0300 @@ -77,7 +77,7 @@ my $index_path = "/index.php"; $index_path = "/$args{'path'}/index.php" if $args{'path'}; - my $login_url = "$args{'protocol'}://$args{'host'}$index_path?title=Special:Userlogin&action=submitlogin"; + my $login_url = "$args{'protocol'}://$args{'host'}$index_path?title=Special:Userlogin&amp;action=submitlogin"; Debug "[login] POST $login_url\..." if $self->{'debug'}; @@ -177,7 +177,7 @@ $tags{'action' } = 'submit'; $resp = $ua->request( - POST "$args{'protocol'}://$WHOST/$WPATH/index.php?title=$args{'title'}&action=submit" , + POST "$args{'protocol'}://$WHOST/$WPATH/index.php?title=$args{'title'}&amp;action=submit" , Content_Type => 'application/x-www-form-urlencoded' , Content => [ %tags ] ); -- Ken Crowell, oeuftete@gmail.com
Subject: RE: submit URLs are using entity (&amp;) instead of actual ampersand (in 0.8012)
As you might see in the current source on http://search.cpan.org/src/RETOH/CMS-MediaWiki- 0.8012/lib/CMS/MediaWiki.pm The ampersand *is* already encoded as &amp; what is actually necessary because there is only one cgi (get) key named "title" sending to the login script. Please verify your installation or re-install the Module. Let me know which mirror you're using. This can be happen on corrupt file systems. Don't have a better explanation right now. --reto http://meta.pgate.net/cms-mediawiki
From: oeuftete [...] gmail.com
Here was my latest correspondence before the bug was rejected. Show quoted text
> Oops, my diff output is backwards from what I intended. > > The patch is to change "&amp;" in those two places to "&". I looked at the source for the Mediawiki > 1.9.0 installation I'm running here, and as far as I can tell it is looking for separate GET keys > "title" and "action". When the module does edit actions (lines 140 and 234), the query string is > already using "&" instead of "&amp;". > > Thanks for the quick reply.
From: oeuftete [...] gmail.com
Sorry, didn't realize adding a reply would automatically reopen the ticket. If you want to reject it, feel free. (I'll maintain a local patch.)
(re-opened by mistake).