Permalink
Browse files

MINOR Protection against infinite initialization/callback loops cause…

…d by loading a full page template via ajax (in LeftAndMain.js)
  • Loading branch information...
1 parent ec2b0a4 commit 6683b380b4f36681d4cabafc9fc5e2a9e3416765 @chillu chillu committed Oct 29, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 admin/javascript/LeftAndMain.js
@@ -153,6 +153,11 @@
// Update panels
jQuery.entwine.synchronous_mode(true);
var newContentEl = $(data);
+
+ if(newContentEl.find('.cms-container').length) {
+ throw 'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';
+ }
+
newContentEl.addClass('loading');
contentEl.replaceWith(newContentEl);
contentEl.remove();

0 comments on commit 6683b38

Please sign in to comment.