mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Prevent raw content being served from storage. (#7443)
TODO: Detailed description to be added once deployed.
This commit is contained in:
@@ -130,6 +130,8 @@ BlocklyStorage.handleRequest_ = function() {
|
||||
BlocklyStorage.alert(BlocklyStorage.HASH_ERROR.replace('%1',
|
||||
window.location.hash));
|
||||
} else {
|
||||
// Remove poison line to prevent raw content from being served.
|
||||
data = data.replace(/^\{\[\(\< UNTRUSTED CONTENT \>\)\]\}\n/, '');
|
||||
BlocklyStorage.loadXml_(data, BlocklyStorage.httpRequest_.workspace);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user