Michael A. Puls II | 13 Jan 2010 14:26
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 08:00:18 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:

> On Wed, 13 Jan 2010 07:48:13 -0500, Michael A. Puls II  
> <shadow2531 <at> gmail.com> wrote:
>
>> On Tue, 12 Jan 2010 13:58:59 -0500, Jon Nathan  
>> <jon+dated+1263754739.7d78aa <at> rupture.net> wrote:
>>
>>> Thanks for your feedback.  What do you think the appropriate way
>>> to adress this is?  I'd hate to only urlencode specific characters.
>>
>> I think the relevant code is actually in parseUrl() in  
>> functions/url_parser.php.
>>
> In url_parser.php, in parseUrl, after:
> $mailto = substr($body, $target_pos, $end-$target_pos);
> add this line:
> $mailto = preg_replace("/\\+/", "%2B", $mailto);
> for example.
>
> That will fix things.

That does fix things, but it breaks some other things. The replacement of  
the '+' characters causes the length to be longer, which messes up other  
calculations down the code a bit. Will investigate.

--

-- 
Michael

(Continue reading)

Michael A. Puls II | 13 Jan 2010 15:36
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 08:26:32 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:

> On Wed, 13 Jan 2010 08:00:18 -0500, Michael A. Puls II  
> <shadow2531 <at> gmail.com> wrote:
>
>> On Wed, 13 Jan 2010 07:48:13 -0500, Michael A. Puls II  
>> <shadow2531 <at> gmail.com> wrote:
>>
>>> On Tue, 12 Jan 2010 13:58:59 -0500, Jon Nathan  
>>> <jon+dated+1263754739.7d78aa <at> rupture.net> wrote:
>>>
>>>> Thanks for your feedback.  What do you think the appropriate way
>>>> to adress this is?  I'd hate to only urlencode specific characters.
>>>
>>> I think the relevant code is actually in parseUrl() in  
>>> functions/url_parser.php.
>>>
>> In url_parser.php, in parseUrl, after:
>> $mailto = substr($body, $target_pos, $end-$target_pos);
>> add this line:
>> $mailto = preg_replace("/\\+/", "%2B", $mailto);
>> for example.
>>
>> That will fix things.
>
> That does fix things, but it breaks some other things. The replacement  
> of the '+' characters causes the length to be longer, which messes up  
> other calculations down the code a bit. Will investigate.

(Continue reading)

Michael A. Puls II | 13 Jan 2010 16:10
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 09:36:02 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:

> On Wed, 13 Jan 2010 08:26:32 -0500, Michael A. Puls II  
> <shadow2531 <at> gmail.com> wrote:
>
>> On Wed, 13 Jan 2010 08:00:18 -0500, Michael A. Puls II  
>> <shadow2531 <at> gmail.com> wrote:
>>
>>> On Wed, 13 Jan 2010 07:48:13 -0500, Michael A. Puls II  
>>> <shadow2531 <at> gmail.com> wrote:
>>>
>>>> On Tue, 12 Jan 2010 13:58:59 -0500, Jon Nathan  
>>>> <jon+dated+1263754739.7d78aa <at> rupture.net> wrote:
>>>>
>>>>> Thanks for your feedback.  What do you think the appropriate way
>>>>> to adress this is?  I'd hate to only urlencode specific characters.
>>>>
>>>> I think the relevant code is actually in parseUrl() in  
>>>> functions/url_parser.php.
>>>>
>>> In url_parser.php, in parseUrl, after:
>>> $mailto = substr($body, $target_pos, $end-$target_pos);
>>> add this line:
>>> $mailto = preg_replace("/\\+/", "%2B", $mailto);
>>> for example.
>>>
>>> That will fix things.
>>
>> That does fix things, but it breaks some other things. The replacement  
(Continue reading)

Michael A. Puls II | 13 Jan 2010 16:33
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 10:10:58 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:

> On Wed, 13 Jan 2010 09:36:02 -0500, Michael A. Puls II  
> <shadow2531 <at> gmail.com> wrote:
>
>> On Wed, 13 Jan 2010 08:26:32 -0500, Michael A. Puls II  
>> <shadow2531 <at> gmail.com> wrote:
>>
>>> On Wed, 13 Jan 2010 08:00:18 -0500, Michael A. Puls II  
>>> <shadow2531 <at> gmail.com> wrote:
>>>
>>>> On Wed, 13 Jan 2010 07:48:13 -0500, Michael A. Puls II  
>>>> <shadow2531 <at> gmail.com> wrote:
>>>>
>>>>> On Tue, 12 Jan 2010 13:58:59 -0500, Jon Nathan  
>>>>> <jon+dated+1263754739.7d78aa <at> rupture.net> wrote:
>>>>>
>>>>>> Thanks for your feedback.  What do you think the appropriate way
>>>>>> to adress this is?  I'd hate to only urlencode specific characters.
>>>>>
>>>>> I think the relevant code is actually in parseUrl() in  
>>>>> functions/url_parser.php.
>>>>>
>>>> In url_parser.php, in parseUrl, after:
>>>> $mailto = substr($body, $target_pos, $end-$target_pos);
>>>> add this line:
>>>> $mailto = preg_replace("/\\+/", "%2B", $mailto);
>>>> for example.
>>>>
(Continue reading)

Michael A. Puls II | 13 Jan 2010 18:25
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:
> Attached is the full patch. Hope that helps.

Attaching the same patch but using str_replace() since regex isn't needed.

--

-- 
Michael
Attachment (url_parser.php.patch): application/octet-stream, 948 bytes
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Jon Nathan | 14 Jan 2010 19:53
Favicon

Re: Patch for mailto: link urlencoding

Thanks for your time on this Michael.  I confirmed that your patch
works nicely.  I'll use this going forward.  

-Jon

* Michael A. Puls II <shadow2531 <at> gmail.com> [01-13-2010 12:25]:
>
> On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II  
> <shadow2531 <at> gmail.com> wrote:
> > Attached is the full patch. Hope that helps.
> 
> Attaching the same patch but using str_replace() since regex isn't needed.
> 
> -- 
> Michael

> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 

> -----
> squirrelmail-devel mailing list
> Posting guidelines: http://squirrelmail.org/postingguidelines
> List address: squirrelmail-devel <at> lists.sourceforge.net
> List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
> List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel

(Continue reading)

Michael A. Puls II | 14 Jan 2010 20:15
Picon

Re: Patch for mailto: link urlencoding

On Thu, 14 Jan 2010 13:53:48 -0500, Jon Nathan  
<jon+dated+1263927229.5257f6 <at> rupture.net> wrote:

> Thanks for your time on this Michael.  I confirmed that your patch
> works nicely.  I'll use this going forward.

You're welcome.

Maybe sometime, I'll convert my JS mailto URI parser code  
<http://shadow2531.com/js/mailto_uri_parser.js> to a  
functions/mailto_uri_parser.php that various SquirrelMail php scripts  
could include and use. That would make things easier all over the place.  
For example, it can parse a mailto URI (including normalization and  
handling of '+') and produce a SquirrelMail ?compose= URI in one shot.  
It's based on  
<http://shadow2531.com/opera/testcases/mailto/modern_mailto_uri_scheme.html>  
and  
<http://shadow2531.com/opera/testcases/mailto/mailto_uri_scheme_idea.html>.

But, for now, enjoy the quick fix.

> * Michael A. Puls II <shadow2531 <at> gmail.com> [01-13-2010 12:25]:
>>
>> On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II
>> <shadow2531 <at> gmail.com> wrote:
>> > Attached is the full patch. Hope that helps.
>>
>> Attaching the same patch but using str_replace() since regex isn't  
>> needed.

(Continue reading)

Michael A. Puls II | 17 Jan 2010 00:38
Picon

Re: Patch for mailto: link urlencoding

On Wed, 13 Jan 2010 12:25:03 -0500, Michael A. Puls II  
<shadow2531 <at> gmail.com> wrote:

> On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II
> <shadow2531 <at> gmail.com> wrote:
>> Attached is the full patch. Hope that helps.
>
> Attaching the same patch but using str_replace() since regex isn't  
> needed.

Attaching new patch that adds a comment as to why replacing + with %2B is  
needed. Including a patch for both 1.4.x and 1.5.x for good measure,  
although 1.4.x and 1.5.x seem to be using the same version of  
url_parser.php.

Paul, are you willing to accept this patch? Or, do you require changes?

--

-- 
Michael
Attachment (sm1.4.x-url_parser.php.patch): application/octet-stream, 1307 bytes
Attachment (sm1.5.x-url_parser.php.patch): application/octet-stream, 1307 bytes
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-----
(Continue reading)

Jonathan Angliss | 19 Jan 2010 04:15
Gravatar

Re: Patch for mailto: link urlencoding

On Sat, 16 Jan 2010 18:38:56 -0500, "Michael A. Puls II"
<shadow2531 <at> gmail.com> wrote:

>On Wed, 13 Jan 2010 12:25:03 -0500, Michael A. Puls II  
><shadow2531 <at> gmail.com> wrote:
>
>> On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II
>> <shadow2531 <at> gmail.com> wrote:
>>> Attached is the full patch. Hope that helps.
>>
>> Attaching the same patch but using str_replace() since regex isn't  
>> needed.
>
>Attaching new patch that adds a comment as to why replacing + with %2B is  
>needed. Including a patch for both 1.4.x and 1.5.x for good measure,  
>although 1.4.x and 1.5.x seem to be using the same version of  
>url_parser.php.
>
>Paul, are you willing to accept this patch? Or, do you require changes?

Accepted, and commited, thanks for the work on this.
--

-- 
Jonathan Angliss
<jon <at> netdork.net>

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
(Continue reading)

Michael A. Puls II | 19 Jan 2010 08:51
Picon

Re: Patch for mailto: link urlencoding

On Mon, 18 Jan 2010 22:15:36 -0500, Jonathan Angliss <jon <at> netdork.net>  
wrote:

> On Sat, 16 Jan 2010 18:38:56 -0500, "Michael A. Puls II"
> <shadow2531 <at> gmail.com> wrote:
>
>> On Wed, 13 Jan 2010 12:25:03 -0500, Michael A. Puls II
>> <shadow2531 <at> gmail.com> wrote:
>>
>>> On Wed, 13 Jan 2010 10:33:44 -0500, Michael A. Puls II
>>> <shadow2531 <at> gmail.com> wrote:
>>>> Attached is the full patch. Hope that helps.
>>>
>>> Attaching the same patch but using str_replace() since regex isn't
>>> needed.
>>
>> Attaching new patch that adds a comment as to why replacing + with %2B  
>> is
>> needed. Including a patch for both 1.4.x and 1.5.x for good measure,
>> although 1.4.x and 1.5.x seem to be using the same version of
>> url_parser.php.
>>
>> Paul, are you willing to accept this patch? Or, do you require changes?
>
> Accepted, and commited, thanks for the work on this.

You're welcome and thanks.

--

-- 
Michael
(Continue reading)


Gmane