Details
Description
Hi,
I believe that the ZF implementation of the rich text editor dijit.Editor is based on outdated Dojo docs and is apparently insecure. In use, it logs warnings to the Firebug console about not using it with HTML Textarea tags - from the Dojo comments:
// Do not use this widget
// with an HTML <TEXTAREA> tag, since the browser unescapes XML escape characters,
// like <. This can have unexpected behavior and lead to security issues
// such as scripting attacks.
The approved method appears to be to use a div instead; however, I suspect this has the downside of not degrading gracefully in the absence of Javascript. I don't know whether the claimed security flaw is important enough to sacrifice this principle for.
The fix is to alter lines 89-92 of Zend/Dojo/View/Helper/Editor.php to:
89 $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); 90 91 $html = '<input' . $this->_htmlAttribs($hiddenAttribs) . $this->getClosingBracket() . 92 '<div dojoType="' . $this->_module . '" ' . $this->_htmlAttribs($attribs) . '>' . $value . '</div>';
Issue Links
| This issue is duplicated by: | ||||
| ZF-8127 | Security issue in Zend_Dojo_View_Helper_Editor |
|
|
|
I fix this is issue in my view helper with follow code: