-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Sanitise HTML in enterprise and product descriptions #12448
Comments
@mkllnk please add clockify code to issue and associated pull requests |
@kirstenalarsen I can't see the clockfy code in this issue : Discover Regenerative (Macdoch pt 2): 3. Open Source Tech Evolution |
Good pick up @rioug . I updated the project codes to give more specificity. Have just adjusted above - could you please switch your hours to #3A |
Done ! I also updated the description on the related PR. |
Yes, we implemented a reversible logic first and now need to do it properly. There have been no complaints about missing formatting as far as I know. |
ℹ️ Please use project Discover Regenerative (Macdoch pt 2): #3A. Tech - OFN & OFN/DFC Endpoints to track work on this issue.
Description
When using a description on another website like the Discover Regenerative portal, any contained HTML tags should be safe.
Currently, the OFN UX allows only certain HTML tags to be inserted into a description. We do not check the content before storing it in the database. Instead, we sanitise the descriptions when displaying them withing the OFN app. Our APIs are not sanitising though, pushing the responsibility to all consumers of the APIs.
The knowledge of allowed HTML tags sits within OFN though and we could sanitise the HTML before storing it in the database. That would make further sanitising in the many other parts of the app redundant. It would also avoid consumers of APIs accidentally embedding unsafe HTML. It would be less work for everyone.
Acceptance Criteria & Tests
<script>
, are filtered out before they are exposed on the DFC API.Related issues:
The text was updated successfully, but these errors were encountered: