Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 41976
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: mst [...] shadowcat.co.uk
Cc:
AdminCc:

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



Subject: Don't seem to be able to use @ in username in URLs?
Date: Fri, 26 Dec 2008 20:08:58 +0000
To: bugs-Mail-Box [...] rt.cpan.org
From: Matt S Trout <mst [...] shadowcat.co.uk>
The regexp that unpacks URL type $manager->open arguments seems to not accept an @ sign, even blackslashed, so I can't use it on mailboxes where the user is the same as the email address. Any thoughts? -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
Subject: Re: [rt.cpan.org #41976] Don't seem to be able to use @ in username in URLs?
Date: Fri, 26 Dec 2008 23:46:52 +0100
To: Matt S Trout via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Matt S Trout via RT (bug-Mail-Box@rt.cpan.org) [081226 20:09]: Show quoted text
> Fri Dec 26 15:09:19 2008: Request 41976 was acted upon. > Transaction: Ticket created by mst@shadowcat.co.uk > Queue: Mail-Box > Subject: Don't seem to be able to use @ in username in URLs? > > > The regexp that unpacks URL type $manager->open arguments seems to not > accept an @ sign, even blackslashed, so I can't use it on mailboxes where > the user is the same as the email address.
Hi Matt, Mail::Box::Manager::decodeFolderURL() is quite HTTP protocol oriented. Could you be more specific on the exact URL you would like to use? -- MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #41976] Don't seem to be able to use @ in username in URLs?
Date: Mon, 29 Dec 2008 16:59:21 +0000
To: Mark Overmeer via RT <bug-Mail-Box [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
On Fri, Dec 26, 2008 at 05:47:08PM -0500, Mark Overmeer via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=41976 > > > * Matt S Trout via RT (bug-Mail-Box@rt.cpan.org) [081226 20:09]:
> > Fri Dec 26 15:09:19 2008: Request 41976 was acted upon. > > Transaction: Ticket created by mst@shadowcat.co.uk > > Queue: Mail-Box > > Subject: Don't seem to be able to use @ in username in URLs? > > > > > > The regexp that unpacks URL type $manager->open arguments seems to not > > accept an @ sign, even blackslashed, so I can't use it on mailboxes where > > the user is the same as the email address.
> > Hi Matt, > > Mail::Box::Manager::decodeFolderURL() is quite HTTP protocol > oriented. Could you be more specific on the exact URL you > would like to use?
username: mst@shadowcat.co.uk password: ... hostname: imap.shadowcat.co.uk not sure how I can encode that. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
Subject: Re: [rt.cpan.org #41976] Don't seem to be able to use @ in username in URLs?
Date: Tue, 30 Dec 2008 10:27:23 +0100
To: Matt S Trout via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <website [...] craneveer.nl>
* Matt S Trout via RT (bug-Mail-Box@rt.cpan.org) [081229 16:59]: Show quoted text
> Queue: Mail-Box > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41976 > > > On Fri, Dec 26, 2008 at 05:47:08PM -0500, Mark Overmeer via RT wrote:
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=41976 > > > > > * Matt S Trout via RT (bug-Mail-Box@rt.cpan.org) [081226 20:09]:
> > > Fri Dec 26 15:09:19 2008: Request 41976 was acted upon. > > > Transaction: Ticket created by mst@shadowcat.co.uk > > > Queue: Mail-Box > > > Subject: Don't seem to be able to use @ in username in URLs? > > > > > > > > > The regexp that unpacks URL type $manager->open arguments seems to not > > > accept an @ sign, even blackslashed, so I can't use it on mailboxes where > > > the user is the same as the email address.
> > > > Hi Matt, > > > > Mail::Box::Manager::decodeFolderURL() is quite HTTP protocol > > oriented. Could you be more specific on the exact URL you > > would like to use?
> > username: mst@shadowcat.co.uk > password: ... > hostname: imap.shadowcat.co.uk > > not sure how I can encode that.
Ah, and the URI syntax is schema://username:password@host:port/... So there is a confusion in '@' signs. I will add escaping with backslashes for :@/\ It is even worse, currently the username is detected as [^:@./]* I expect that you can use username, password, server_name, and server_port as seperate parameters as temporary work-around. -- MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #41976] Don't seem to be able to use @ in username in URLs?
Date: Tue, 30 Dec 2008 14:41:55 +0100
To: Matt S Trout via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Matt S Trout via RT (bug-Mail-Box@rt.cpan.org) [081229 16:59]: Show quoted text
> Queue: Mail-Box > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41976 > > > username: mst@shadowcat.co.uk > password: ... > hostname: imap.shadowcat.co.uk > not sure how I can encode that.
In 2.087, I will decode the username just like the password. So, Mail::Box::Manager::decodeFolderURL() will see this change: $username ||= $ENV{USER} || $ENV{LOGNAME}; $password ||= ''; # decode password from url - $password =~ s/\+/ /g; - $password =~ s/\%([A-Fa-f0-9]{2})/chr hex $1/ge; + for($username, $password) + { s/\+/ /g; + s/\%([A-Fa-f0-9]{2})/chr hex $1/ge; + } So, you need to change '@' into %40. Thanks for the report. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
fixed in 2.087