Fix html decoding in Job Viewer -> Edit Search #1268
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original Bug Report:
https://app.asana.com/0/342819846538629/828830620362347
When entering a Search Title that contains html encodable values ( <, >,
& etc ), saving and then editing the search causes the encoded title to
be editable, not the decoded title.
Example:
search you will instead see
the value below.
Pwned!<script>alert(1)</script>
Description:
the .text element contains html content. but you have to put normal
text in the form field.
--
Notes
the actual fix for the problem is the one line change to add the
Ext.util.Format.htmlDecode
call in SearchPanel.js. However, on inspection of the code, the html sanitization was being performed in the client rather than the server. This is a serious bug. Since both fixes are needed and they both impact the same code flow this pull request fixes both bugs.