Skip Menu |

This queue is for tickets about the Mac-AppleScript CPAN distribution.

Report information
The Basics
Id: 129446
Status: new
Priority: 0/
Queue: Mac-AppleScript

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

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



Subject: Provide literal-creation sub
Virtually every user of your module will want to generate AppleScript commands. To avoid code injection bugs, they'll all need something like the following: sub text_to_as_lit { '"'.( $_[0] =~ s/([\\"])/\\$1/rg ).'"' } The module should probably a suitable sub rather than having each of its users recreate it. Untested. (Not a Mac user.)
On Sun May 05 03:30:12 2019, ikegami wrote: Show quoted text
> Virtually every user of your module will want to generate AppleScript > commands. To avoid code injection bugs, they'll all need something > like the following: > > sub text_to_as_lit { '"'.( $_[0] =~ s/([\\"])/\\$1/rg ).'"' } > > The module should probably a suitable sub rather than having each of
*The module should probably provide ... Show quoted text
> its users recreate it. > > Untested. (Not a Mac user.)