\t\t\t// can be abused to get increased priveledges. \t\t\tnew XPCNativeWrapper(unsafeContentWin, "setTimeout()") \t\t\t\t.setTimeout(function(){details[event](responseState);}, 0); \t\t} \t} } EOF; $xpi['content/' . $data['shortname'] . '.js'] = $_POST['script'] . "\n"; //walk over the xpi array, and replace all our "variables" unset($_POST['script']); //for efficiency foreach (array_keys($xpi) as $k) { $xpi[$k] = insertValues($xpi[$k], $data); } $zip = new CreateZip(); $zip->addDirectory('chrome/'); foreach ($xpi as $k => $v) { $zip->addFile($v, $k); } $zip->forceDownload($data['shortname']); print_r($_FILES['script']); } else { ?> <!doctype html public '-//w3c//dtd xhtml 1.1//en' 'http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd'> <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'> <head> <meta http-equiv='content-type' content='text/html; charset=UTF-8' /> <title>User Script Compiler</title> <style type='text/css'> body { font-family: Helvetica, Verdana, Sans-Serif;