Dangerous workaround for running scripts from an iFrame... #5955
Replies: 3 comments 7 replies
-
@ericshulman ... It seems your formatted source doesn't work. I needed to modify it a bit.
They finally found a way to directly execute "copy / pasted" If the code would come from a different domain, imo the Users already can create wikitext that runs havoc using action-setfield. .. See: #5916 |
Beta Was this translation helpful? Give feedback.
-
We would need to modify the html-parser and add some sanitation to some elements. With sanitation I mean: Adding some parameters to the widget tree eg: To lock it down we would need |
Beta Was this translation helpful? Give feedback.
-
As @ericshulman says, the problem is not so much that iframes can be created that contain executable JavaScript, but that the JS has access to the TiddlyWiki global scope:
The fix would indeed appear to be to enforce a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In a recent post in the GoogleGroups, CJ.veniot wrote:
I was going to reply to his post in the GoogleGroup, but then I though perhaps this is too dangerous a topic for discussion there!
The danger is that the javascript running in the iframe can use "window.parent" to do some nasty things.
For example, the following tiddler content will automatically delete "$:/HistoryList" as soon as the tiddler containing the iFrame is viewed, which instantly wreaks havoc on the main Story column, with no obvious way to recover.
What can we do to prevent this kind of mayhem?!?
Beta Was this translation helpful? Give feedback.
All reactions