Project

General

Profile

Actions

Bug #33651

closed

closing textarea tag on html element in backend closes the textarea itself.

Added by Martin Braun about 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2012-02-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

by adding html content in the backend (html element) that contains "</textarea>", the save will be done.
however, on trying to reload/edit the html element in the backend the "</textarea>" (that is apart of own user/admin content) actually closes the textarea of the backend form itself.

the content will be cut off in the backend editor.


Files


Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #46707: Bad HTML parsingClosed2013-03-27

Actions
Has duplicate TYPO3 Core - Bug #33272: Persistent XSS in HTML content element through t3editorClosed2012-01-17

Actions
Actions #1

Updated by Boris Hinzer almost 12 years ago

Same bug still exists in TYPO3 4.7 and ist IMHO a major risk. Additionally, the closing </textarea> can be used to manipulate the TYPO3 backend and also include foreign code using iframes. Please take a look at the attached screenshot.

Here goes the code if want to reproduce this issue:

<form onsubmit="" method="post" action="http://www.web-vision.de/">
  <input type="hidden" value="true" name="bulk">
      <input type="hidden" value="1" name="register">
       <input type="hidden" value="14" name="domain_cat">
    Domain: <textarea  name="sld"></textarea>
    <h1>Now I can manipulate the TYPO3 Backend</h1>
    <iframe src="/robots.txt" style="width:200px; height:200px;"></iframe>
  <input type="checkbox"  value="HERE GOES MY CONTENT"/>
  <input type="submit"  value="SUBMIT"/>

Also this breaks the frontend output of the website.

Actions #2

Updated by Helmut Hummel almost 12 years ago

  • Assignee deleted (Helmut Hummel)

Boris Hinzer wrote:

Same bug still exists in TYPO3 4.7 and ist IMHO a major risk.

If you allow someone to use the HTML element, you must trust that person, this bug present or not. I could put arbitrary JavaScript in that element, which is then rendered in the frontend. With that I could also do everything in case a logged in user visits that page.

So yes, this bug needs to be fixed, but it does not add additional risks to a TYPO3 installation.

Actions #3

Updated by PRISMA Computer over 11 years ago

This bug is very very bad and should be fixed in 4.7. No more HTML with textarea-element is possible. Typo3 saves the right code one time. But it displays a destroyed version. So, if you save again, the HTML code is broken.

We've chosen 4.7 because it's LTS. We had better taken 4.5 from Ubuntu-repos... But here's a hint for everybody having the same problem. Just add the textarea-element via the template with a little bit javascript and a <div id="placeholder"></div> container:

page.headerData.31 = TEXT
page.headerData.31.value (
<script type="text/javascript">
function AddTextArea() {
var area = document.createElement('textarea');
element = document.getElementById('placeholder').appendChild(area);
element.setAttribute('name', 'comment');
element.setAttribute('cols', '40');
element.setAttribute('rows', '10');
element.setAttribute('wrap', 'virtual');
}
</script>
)
page.bodyTag = <body onload="AddTextArea();">

Actions #4

Updated by Gerrit Code Review about 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19510

Actions #5

Updated by Georg Ringer about 11 years ago

btw 4.7 is no LTS

Actions #6

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19582

Actions #7

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19584

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/19585

Actions #9

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/19587

Actions #10

Updated by Georg Ringer about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF