Skip to content

Commit

Permalink
[mms] SECURITY: Fix XSS vulnerability when manually switching between…
Browse files Browse the repository at this point in the history
… plaintext -> HTML compose mode.

Reported by: João Machado <geral@jpaulo.eu>
  • Loading branch information
slusarz committed Mar 5, 2015
1 parent 266b370 commit ce0d8c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions imp/docs/CHANGES
Expand Up @@ -2,6 +2,8 @@
v6.2.8-git
----------

[mms] SECURITY: Fix XSS vulnerability when manually switching between plaintext
-> HTML compose mode.
[jan] Fix protocol name in POP3 example backend configuration.
[mms] Don't honor linked attachment limit configuration options if linked
attachments are disabled (Bug #13665).
Expand Down
9 changes: 7 additions & 2 deletions imp/js/compose-dimp.js
Expand Up @@ -581,8 +581,13 @@ var DimpCompose = {
this.rte = new IMP_Editor('composeMessage', config);

this.rte.editor.on('getData', function(evt) {
var elt = new Element('SPAN').insert(evt.data.dataValue),
elts = elt.select('IMG[dropatc_id]');
var elt = new Element('SPAN'), elts;

/* Don't use prototype's insert() since we don't want any
* scripts that may exist in the text data to be eval'd. */
elt.innerHTML = evt.data.dataValue;
elts = elt.select('IMG[dropatc_id]');

if (elts.size()) {
elts.invoke('writeAttribute', 'dropatc_id', null);
elts.invoke('writeAttribute', 'src', null);
Expand Down
2 changes: 2 additions & 0 deletions imp/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [mms] SECURITY: Fix XSS vulnerability when manually switching between plaintext -&gt; HTML compose mode.
* [jan] Fix protocol name in POP3 example backend configuration.
* [mms] Don&apos;t honor linked attachment limit configuration options if linked attachments are disabled (Bug #13665).
</notes>
Expand Down Expand Up @@ -3829,6 +3830,7 @@
<date>2015-02-10</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [mms] SECURITY: Fix XSS vulnerability when manually switching between plaintext -&gt; HTML compose mode.
* [jan] Fix protocol name in POP3 example backend configuration.
* [mms] Don&apos;t honor linked attachment limit configuration options if linked attachments are disabled (Bug #13665).
</notes>
Expand Down

0 comments on commit ce0d8c6

Please sign in to comment.