Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Strip Tags in New Input Implementation #1252

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

klees
Copy link
Member

@klees klees commented Oct 25, 2018

After discussing the issue of XSS-protection in the new input implementation of the UI-framework in #1189, @Amstutz and I decided to remove tags altogether in the currently available text-input-fields to allow people to use the new input implementation without the burden to think of correctly removing XSS-related input. This will break use-cases, where textarea and text field should actually be used to input HTML, but we prefer bug reports for these cases over XSS-vulnerabilities.

We will look into a proper long term solution for the use-cases that actually need some html-tags for ILIAS 6.0.

Note that this is no breaking change, thus no JF-decision etc. is required.

Copy link
Contributor

@Amstutz Amstutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx a lot @klees for this important addition. In future we might need a litte mutator to allow tags for some scenarios of those fields, where the client sanitizes the input in a more elaborate way.

However, I think it would be a better long term perspective to adapt such scenarios by using markup and do things like bold this way (as github does).

@@ -427,6 +427,9 @@ private function getOperations() {
* @inheritdoc
*/
final public function getContent() {
if (is_null($this->content)) {
throw new \LogicException("No content of this field has been evaluated yet. Seems withInput was not called.");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, good one.

@@ -45,7 +45,7 @@ public function withInput(PostData $input);
/**
* Get the current content of the input.
*
* @return Result|null
* @return Result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@Amstutz Amstutz merged commit ab3535a into ILIAS-eLearning:trunk Oct 25, 2018
@klees klees deleted the trunk_input_striptags branch October 25, 2018 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants