Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <5314301.3lsYH2pUt3@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 19 Nov 2013 00:42:23 +0100 User-Agent: KNode/4.10.5 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <46296233-c493-4de4-921e-2dc9c7870622@googlegroups.com> <1cb35df7-7de2-4139-a31f-100139b5c794@googlegroups.com> <5957377.XgIPmTjdrt@PointedEars.de> <34f9ce58-665f-47db-a18e-f8c34197b9cf@googlegroups.com> <07194009-fe3b-40f4-a75b-769d330613ca@googlegroups.com> <8d52d023-3809-47b3-82c5-6fee6eff3734@googlegroups.com> Supersedes: <1849997.FUSNMQW7Q7@PointedEars.de> MIME-Version: 1.0 Lines: 51 NNTP-Posting-Date: 19 Nov 2013 00:42:27 CET NNTP-Posting-Host: 3cbaf2e1.newsspool4.arcor-online.net X-Trace: DXC=n79@VMbK>6jOKO]LCQ@0g`4IUK On Saturday, November 16, 2013 12:35:47 PM UTC-6, JJ wrote: >> Sorry, I'm not quite good at English and can't understand which part >> where data is leaked to G. Could you give a simple example code, please? > > function f(x,y,z){ > console.log([" x:",x," y:",y," z:",z].join("")) > g(arguments); > console.log([" x:",x," y:",y," z:",z].join("")) > } > > function g(args){ > args[0] = "foo" > args[1] = "bar" > args[2] = args.callee > } > > f(1,2,3) I think you have misplaced your spaces and semicolons. Anyhow: function f (x, y, z) { "use strict"; /* *x: 1, y: 2, z: 3" */ console.log(["x: ", x, " y: ", y, " z: ", z].join("")); g(arguments); /* "x: 1, y: 2, z: 3" */ console.log(["x: ", x, " y: ", y, " z: ", z].join("")); } function g (args) { args[0] = "foo" args[1] = "bar" // args[2] = args.callee } f(1, 2, 3); Therefore, it was _not_ necessary to forbid arguments.callee in strict mode. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.