develooper Front page | perl.perl5.porters | Postings from January 2017

[perl #121553] perlbug should offer to execute a mailto link

From:
bulk88 via RT
Date:
January 22, 2017 21:39
Subject:
[perl #121553] perlbug should offer to execute a mailto link
Message ID:
rt-4.0.24-861-1485121130-132.121553-15-0@perl.org
On Mon, 05 Oct 2015 19:23:56 -0700, jkeenan wrote:
> I reviewed this older ticket this evening.  TonyC provided some
> feedback in April 2014, but it doesn't appear there has been any
> further correspondence.
> 
> If you want to pursue this, could you prepare a patch?
> 
> Thank you very much.

I wrote a crude patch that uses URI::Escape (not core!!!!). There is 1 minor limit of mailto URL spec, no HTML, no MIME, no attachment, but perlbug doesnt generate attachments by default anyway (arbitrary user speced only). I did find another limit, there is a truncation/buffer size bug somewhere. The URL generated works fine if I copy paste it into Seamonkey 2.46's URL bar. BUT if I do system('start mailto://') or copy paste the "start mailto://" into cmd.exe, or paste the mailto:// URL into Win7 explorer's URL bar, the email body is truncated around 2015-2040 byte mark (the "byteorder" variable in the perlbug email). This 2KB limit is AFTER percent escaping, so the email body in the Seamonkey composer is actually 1280 bytes long. A

-----------------------------
perl -e" print \"\n\n\n\n\n\n\n\".$ARGV[0]" mailto://perlbug@perl.org?subject=kjjh%20kuh^&body=This%20is%20a%20bug%20report%20for%20perl%20from.......................
-----------------------------

shows the full URL in STDOUT, so its not a shell bug, it is a Seamonkey or somewhere else in Windows bug. I am thinking possibly adding a "start %TEMP%/YsTDFrLJ.eml" or something, or using Win32 MAPI and WSH (MAPI is COM based, and because no Win32::OLE in core, use WSH VB/JS somehow to launch the compose window in a C-free solution).

Possibly related link https://blogs.msdn.microsoft.com/ieinternals/2014/08/13/url-length-limits/ "On Windows 8.1, for instance, if you directly pass a 4k Application Protocol URL to ShellExecute in native code, the URL is silently truncated at the 2083 character mark."

https://support.microsoft.com/en-us/help/830473/command-prompt-cmd.-exe-command-line-string-limitation


-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121553



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About