FS#5779 - [tupkg] '+' in upload filename

Attached to Project: AUR web interface
Opened by dtw (dibblethewrecker) - Tuesday, 07 November 2006, 18:07 GMT
Last edited by Callan Barrett (wizzomafizzo) - Thursday, 27 March 2008, 09:21 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To Simo Leone (neotuli)
Architecture All
Severity Critical
Priority Flash
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Not sure why aurtools/tupkg is in [community] as it is an official developement pkg! That aside...

Following this thread: http://www.archlinux.org/pipermail/tur-users/2006-November/003500.html

It seems tupkg does not correctly handle "+" chars in pkgnames and replaces with whitespace.

Bug report is purely for the sake of completeness.
This task depends upon

Closed by  Callan Barrett (wizzomafizzo)
Thursday, 27 March 2008, 09:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  I don't think the reason for reopening was the same bug, one refers to the tupkg script and the other the AUR pkgsubmit.php
Comment by Paul Mattal (paul) - Sunday, 11 February 2007, 21:59 GMT
I think I've finally tracked this down. It's the unquoting going on in the send message functions in tupkg and tupkgs.

I'm not sure why you would need to unquote.. maybe for better readability?

I would like someone else to sanity check there isn't something I'm missing before we deploy this. I've checked it in as rev 238.

The especially nice thing is that each half of this patch can be rolled out separately, and it's really only the client-side patch needed to actually fix the bug. So we can roll this out with the next release, and will need to build a new set of aurtools.
Comment by Paul Mattal (paul) - Sunday, 11 February 2007, 21:59 GMT
For convenience, here's the patch:

===================================================================
--- server/tupkgs (revision 327)
+++ server/tupkgs (working copy)
@@ -92,7 +92,7 @@

def sendMsg(self, msg):
if type(msg) == dict:
- msg = urllib.unquote(urllib.urlencode(msg,1))
+ msg = urllib.urlencode(msg,1)
length = struct.pack("H", socket.htons(len(msg)))
self.socket.sendall(length)
self.socket.sendall(msg)
Index: client/tupkg
===================================================================
--- client/tupkg (revision 327)
+++ client/tupkg (working copy)
@@ -62,7 +62,7 @@

def sendMsg(self, msg):
if type(msg) == dict:
- msg = urllib.unquote(urllib.urlencode(msg,1))
+ msg = urllib.urlencode(msg,1)
length = struct.pack("H", socket.htons(len(msg)))
self.socket.sendall(length)
self.socket.sendall(msg)
Comment by Douglas Soares de Andrade (dsa) - Monday, 12 February 2007, 07:16 GMT
Hi Paul,

Can we close this bug then ?

Comment by Jaroslaw Swierczynski (swiergot) - Thursday, 22 February 2007, 13:57 GMT
Paul said it's fixed so I guess we can.
Comment by eliott (cactus) - Sunday, 12 August 2007, 01:39 GMT
Reopen request:

2007-05-06 Darwin Bautista (djclue917) Requested task to be re-opened - For some reason, the bug is back. I tried uploading 'socket++' and I get a "Invalid name: only lowercase letters are allowed." just like before.

Loading...