Skip to content

Escape error messages#7308

Merged
rodrigok merged 4 commits into
developfrom
improvements/escape-error-messages
Jun 28, 2017
Merged

Escape error messages#7308
rodrigok merged 4 commits into
developfrom
improvements/escape-error-messages

Conversation

@rodrigok
Copy link
Copy Markdown
Member

@RocketChat/core

@rodrigok rodrigok added this to the 0.58.0 milestone Jun 22, 2017
@rodrigok rodrigok requested a review from sampaiodiego June 22, 2017 19:07
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7308 June 22, 2017 19:08 Inactive
Copy link
Copy Markdown
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

should the return of TAPi18n.__ be escaped instead of translation key?

@rodrigok
Copy link
Copy Markdown
Member Author

@sampaiodiego Why, the result is the combination of the user input with the translation string, the only part that can be used to execute JS without our knowledge is the user input. That way we allow some HTML formatting inside our translation strings prevent undesired HTML execution from user input.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7308 June 22, 2017 21:03 Inactive
@rodrigok rodrigok had a problem deploying to rocket-chat-pr-7308 June 22, 2017 21:03 Failure
@rodrigok rodrigok modified the milestones: 0.57.0, 0.58.0 Jun 27, 2017
@rodrigok rodrigok merged commit 5207aac into develop Jun 28, 2017
@rodrigok rodrigok deleted the improvements/escape-error-messages branch June 28, 2017 14:05
rodrigok added a commit that referenced this pull request Jun 28, 2017
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.

3 participants