• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript and PHP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and PHP


  • Subject: Re: AppleScript and PHP
  • From: Rob Lewis <email@hidden>
  • Date: Tue, 12 Feb 2008 09:32:31 -0800


On Feb 12, 2008, at 6:25 AM, email@hidden wrote:


On Feb 12, 2008 9:02 AM, has <email@hidden> wrote:

On 10 Feb 2008, at 22:47, Rob Lewis wrote:


There's an interesting CGI called "x2web" that supports embedding

AppleScript code inside <applescript> and </applescript> tags.


I hope not - that would be incredibly unsafe on anything but a

completely closed and trusted system (see code injection attack).


?  I'm assuming the AS is still run on the server, not the client...



If the OP, Rob, is talking about a server-side web programming or  

templating system à la PHP where the embedded code is executed in  

order to generate a finished HTML document to send to the user, then  

ignore what I said because I thought he was meaning something different.


The way I read it, it sounded as if the server was serving up an HTML  

file with embedded AppleScript code in it, and that code was  

subsequently being sent back to the server to execute. Irresponsible  

DHTML developers do this sort of thing sometimes with client-side  

_javascript_; for example, having the _javascript_ construct things like  

raw SQL queries and sending those directly to the server-side  

database. A malicious user can easily substitute the embedded  

_javascript_ with their own in order to do nasty things such as deleting  

the entire database.


(FWIW, I did take a look at the x2web package to see if it made things  

any clearer, but it's completely undocumented so I wasn't any the  

wiser for it.)


Forgive my general ignorance on these subjects, but here's my understanding: 

x2web is a CGI. You set it up so it preprocesses files with the extension ".x10", just as the PHP interpreter preprocesses ".php" files. 

A ".x10" file can contain AppleScript inside the <applescript> and </applescript> tags. Presumably anything returned by the script is inserted into the HTML being output by the preprocessor. 

Those interested can reach the author at email@hidden. As I mentioned, he has stated that he's on the verge of a major new release (including, I think, documentation). 

And that's all I know. 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Changing default mail app with applescript
  • Next by Date: Re: Delete Bug or Feature?
  • Previous by thread: Changing default mail app with applescript
  • Next by thread: Help with understanding matrices
  • Index(es):
    • Date
    • Thread