3.1.2

Security

  • raw() sanitizer bypass through DOM clobbering, fixed. In <form onclick="…" action="javascript:…"><input name="attributes"></form>, form.attributes is the <input>. The sanitizer read attributes straight off each element, so it saw no attributes on such a form, and its event handlers and javascript: action were kept at normal and strict.
    • The sanitizer and every helper that reads rendered elements now read a form's or the document's properties from their prototypes (new safe-dom.helper.ts). This fixes:
      • a control named localName, removeAttribute, querySelectorAll or childNodes used to make rendering throw or drop raw() content.
      • a control named parentElement sent the nested-component check into an endless loop, which froze the tab.
      • tokens such as @name, @id and @attr: returned the <input> instead of a string.
    • raw() content now loses any id/name that names a document or <form> property, or starts with __NUTIN (new SecurityHelper.stripClobberingNamesFrom(root) and stripRawMarkup(markup)).